diff --git a/nucleus/southbound.go b/nucleus/southbound.go index 9de3b15fe408b8bd73173dda0c067b34a70accbf..a49f1c3d99196acefdd17c131b1cbf69b587a737 100644 --- a/nucleus/southbound.go +++ b/nucleus/southbound.go @@ -114,7 +114,10 @@ func unmarshal(schema *ytypes.Schema, bytes []byte, fields []string, goStruct yg return err } ygot.PruneEmptyBranches(validatedDeepCopy) - return ygot.MergeStructInto(goStruct, validatedDeepCopy) + + opts := []ygot.MergeOpt{&ygot.MergeOverwriteExistingFields{}} + + return ygot.MergeStructInto(goStruct, validatedDeepCopy, opts...) } // getField traverses the GoStruct and returns the field that represents the