feat: 网元配置数据查询无data时返回空数组
This commit is contained in:
@@ -68,6 +68,10 @@ func NeConfigInfo(neInfo model.NeInfo, paramName string) (map[string]any, error)
|
|||||||
logger.Errorf("NeConfigInfo Unmarshal %s", err.Error())
|
logger.Errorf("NeConfigInfo Unmarshal %s", err.Error())
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
// 网元参数配置信息为空时是{},需要补充data属性
|
||||||
|
if _, ok := resData["data"]; !ok {
|
||||||
|
resData["data"] = []map[string]any{}
|
||||||
|
}
|
||||||
return resData, nil
|
return resData, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user