Skip to content
Snippets Groups Projects
Commit ddaf6e00 authored by Malte Bauch's avatar Malte Bauch
Browse files

Add missing `err != nil` check

parent 9cc61b07
No related branches found
No related tags found
1 merge request!417Fix: Set does not update the model within the database
Pipeline #130271 failed
This commit is part of merge request !417. Comments created here will be created in the context of that merge request.
......@@ -149,6 +149,9 @@ func (pnd *pndImplementation) Commit(u uuid.UUID) error {
// Set all the changes within the network elements model
networkElement, err := pnd.networkElementService.Get(store.Query{ID: ch.AssociatedDeviceID()})
if err != nil {
return err
}
diff, err := ygot.Diff(ch.PreviousState(), ch.IntendedState())
for _, update := range diff.GetUpdate() {
opts := []ytypes.SetNodeOpt{&ytypes.InitMissingElements{}, &ytypes.TolerateJSONInconsistencies{}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment