fix: 网元许可检查状态响应nil字符串
This commit is contained in:
@@ -198,7 +198,7 @@ func (s *NeLicenseController) State(c *gin.Context) {
|
|||||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo")))
|
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo")))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if neState, err := neService.NeState(neInfo); err == nil {
|
if neState, err := neService.NeState(neInfo); err == nil && neState["sn"] != nil {
|
||||||
neLicense.Status = "1"
|
neLicense.Status = "1"
|
||||||
neLicense.SerialNum = fmt.Sprint(neState["sn"])
|
neLicense.SerialNum = fmt.Sprint(neState["sn"])
|
||||||
neLicense.ExpiryDate = fmt.Sprint(neState["expire"])
|
neLicense.ExpiryDate = fmt.Sprint(neState["expire"])
|
||||||
|
|||||||
Reference in New Issue
Block a user