fix: ne info add/edit need to update capability of ne_license

This commit is contained in:
simon
2025-04-30 12:24:38 +08:00
parent 8338dd3a60
commit 3a7dd5279c

View File

@@ -398,7 +398,7 @@ func (s *NeInfoController) Add(c *gin.Context) {
neLicense.Status = "1" neLicense.Status = "1"
} }
if v, ok := body.ServerState["capability"]; ok && v != nil { if v, ok := body.ServerState["capability"]; ok && v != nil {
neLicense.Capability = v.(string) neLicense.Capability = fmt.Sprintf("%v", v)
} }
} }
@@ -496,7 +496,7 @@ func (s *NeInfoController) Edit(c *gin.Context) {
neLicense.UpdateBy = loginUserName neLicense.UpdateBy = loginUserName
} }
if v, ok := body.ServerState["capability"]; ok && v != nil { if v, ok := body.ServerState["capability"]; ok && v != nil {
neLicense.Capability = v.(string) neLicense.Capability = fmt.Sprintf("%v", v)
} }
} }