Fix for key

This commit is contained in:
qAison 2018-10-12 16:29:31 +08:00
parent fa104e4300
commit f7da25b1ac

View File

@ -906,7 +906,7 @@ func convertInterfaceToMap(values interface{}, withIgnoredField bool) map[string
func (scope *Scope) updatedAttrsWithValues(value interface{}) (results map[string]interface{}, hasUpdate bool) { func (scope *Scope) updatedAttrsWithValues(value interface{}) (results map[string]interface{}, hasUpdate bool) {
if scope.IndirectValue().Kind() != reflect.Struct { if scope.IndirectValue().Kind() != reflect.Struct {
results = convertInterfaceToMap(value, false) results = convertInterfaceToMap(value, false)
for key, _ := range results { for key := range results {
if !scope.changeableFieldName(key) { if !scope.changeableFieldName(key) {
delete(results, key) delete(results, key)
} }