1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 06:40:55 +00:00
This commit is contained in:
BaoyangChai 2019-03-23 00:33:26 +08:00
parent 65f587d5e9
commit 005391be81

View File

@ -631,14 +631,8 @@ func (d *dbBase) Update(q dbQuerier, mi *modelInfo, ind reflect.Value, tz *time.
}
if find {
newSetNames := make([]string, 0, len(setNames)-1)
newSetNames = append(newSetNames, setNames[0:index]...)
newSetNames = append(newSetNames, setNames[index+1:]...)
setNames = newSetNames
newSetValues := make([]interface{}, 0, len(setNames)-1)
newSetValues = append(newSetValues, setValues[0:index]...)
newSetValues = append(newSetValues, setValues[index+1:]...)
setValues = newSetValues
setNames = append(setNames[0:index], setNames[index+1:]...)
setValues = append(setValues[0:index], setValues[index+1:]...)
}