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

linter pleasing

parent ddaf6e00
Branches
Tags
1 merge request!417Fix: Set does not update the model within the database
Pipeline #130272 failed
...@@ -153,6 +153,9 @@ func (pnd *pndImplementation) Commit(u uuid.UUID) error { ...@@ -153,6 +153,9 @@ func (pnd *pndImplementation) Commit(u uuid.UUID) error {
return err return err
} }
diff, err := ygot.Diff(ch.PreviousState(), ch.IntendedState()) diff, err := ygot.Diff(ch.PreviousState(), ch.IntendedState())
if err != nil {
return err
}
for _, update := range diff.GetUpdate() { for _, update := range diff.GetUpdate() {
opts := []ytypes.SetNodeOpt{&ytypes.InitMissingElements{}, &ytypes.TolerateJSONInconsistencies{}} opts := []ytypes.SetNodeOpt{&ytypes.InitMissingElements{}, &ytypes.TolerateJSONInconsistencies{}}
if err := ytypes.SetNode(networkElement.SBI().Schema().RootSchema(), networkElement.GetModel(), update.GetPath(), update.GetVal(), opts...); err != nil { if err := ytypes.SetNode(networkElement.SBI().Schema().RootSchema(), networkElement.GetModel(), update.GetPath(), update.GetVal(), opts...); err != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment