fix insert time is nil error
This commit is contained in:
parent
4e21af9122
commit
1663d9f3db
|
@ -1545,7 +1545,10 @@ func (engine *Engine) formatColTime(col *core.Column, t time.Time) (v interface{
|
||||||
if col.Nullable {
|
if col.Nullable {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return ""
|
if col.Default != "" {
|
||||||
|
return col.Default
|
||||||
|
}
|
||||||
|
return engine.formatTime(col.SQLType.Name, t)
|
||||||
}
|
}
|
||||||
|
|
||||||
if col.TimeZone != nil {
|
if col.TimeZone != nil {
|
||||||
|
|
Loading…
Reference in New Issue