fix: cert not update

This commit is contained in:
Daniel Ding
2023-09-26 20:50:55 +08:00
parent b093aefd8c
commit 668788dc0d
4 changed files with 11 additions and 9 deletions

View File

@@ -153,12 +153,13 @@ func (s *Switch) Format() {
for _, obj := range s.Network {
context := obj.Specifies
obj.NewSpecifies()
if data, err := libol.Marshal(context, true); err == nil {
if err := libol.Unmarshal(obj.Specifies, data); err != nil {
libol.Warn("Switch.Format %s", err)
} else {
libol.Info("Switch.Format %v", obj.Specifies)
}
if obj.Specifies == nil {
continue
}
if data, err := libol.Marshal(context, true); err != nil {
libol.Warn("Switch.Format %s", err)
} else if err := libol.Unmarshal(obj.Specifies, data); err != nil {
libol.Warn("Switch.Format %s", err)
}
}
}