From fb2343567b41bc116447b3870976291dc9afadd4 Mon Sep 17 00:00:00 2001 From: astaxie Date: Tue, 30 Aug 2016 20:40:46 +0800 Subject: [PATCH] fix #2125 --- orm/db_utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orm/db_utils.go b/orm/db_utils.go index cf465d02..34ddfae9 100644 --- a/orm/db_utils.go +++ b/orm/db_utils.go @@ -145,7 +145,7 @@ outFor: if v, ok := arg.(time.Time); ok { if fi != nil && fi.fieldType == TypeDateField { arg = v.In(tz).Format(formatDate) - } else if fi.fieldType == TypeDateTimeField { + } else if fi != nil && fi.fieldType == TypeDateTimeField { arg = v.In(tz).Format(formatDateTime) } else { arg = v.In(tz).Format(formatTime)