9047d21e by slene

orm fix, def a string in model but use int in db may cause nil pointer error

1 parent 74a95f6c
......@@ -1070,11 +1070,11 @@ setValue:
value = b
}
case fieldType == TypeCharField || fieldType == TypeTextField:
s := str.String()
if str == nil {
s = ToStr(val)
value = ToStr(val)
} else {
value = str.String()
}
value = s
case fieldType == TypeDateField || fieldType == TypeDateTimeField:
if str == nil {
switch v := val.(type) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!