Fix error when updating objects with slice data

This commit is contained in:
WithoutPants
2019-10-15 12:17:56 +11:00
parent 4433917768
commit a4f0a80816

View File

@@ -295,9 +295,8 @@ func sqlGenKeys(i interface{}, partial bool) string {
} }
default: default:
reflectValue := reflect.ValueOf(t) reflectValue := reflect.ValueOf(t)
kind := reflectValue.Kind()
isNil := reflectValue.IsNil() isNil := reflectValue.IsNil()
if kind != reflect.Ptr || !isNil { if !isNil {
query = append(query, fmt.Sprintf("%s=:%s", key, key)) query = append(query, fmt.Sprintf("%s=:%s", key, key))
} }
} }