处理UpdateStore时,传入autoEnableAt引起的crash

This commit is contained in:
gazebo
2019-11-20 22:00:22 +08:00
parent 605ca94ccf
commit 75caa1fffd
2 changed files with 27 additions and 20 deletions

View File

@@ -8,6 +8,7 @@ import (
"reflect"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals"
)
func CheckAndGetStructValue(item interface{}) *reflect.Value {
@@ -70,7 +71,9 @@ func FilterMapByStructObject(mapData map[string]interface{}, obj interface{}, ob
}
}
if objPtr != nil {
utils.Map2StructByJson(m, objPtr, true)
if err := utils.Map2StructByJson(m, objPtr, true); err != nil {
globals.SugarLogger.Warnf("FilterMapByStructObject failed with err:%v, mapData:%s", err, utils.Format4Output(mapData, true))
}
}
return valid, invalid
}