Fix for key
This commit is contained in:
parent
fa104e4300
commit
f7da25b1ac
2
scope.go
2
scope.go
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user