From 8d23357a13a8728fd4a2da32137fd13b04752359 Mon Sep 17 00:00:00 2001 From: Stash Dev Date: Mon, 4 Mar 2019 19:37:22 -0800 Subject: [PATCH] Fix dates --- pkg/models/sqlite_date.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/models/sqlite_date.go b/pkg/models/sqlite_date.go index e2c670161..c3fb6d012 100644 --- a/pkg/models/sqlite_date.go +++ b/pkg/models/sqlite_date.go @@ -22,8 +22,10 @@ func (t *SQLiteDate) Scan(value interface{}) error { } t.String = dateTime.Format("2006-01-02") - if t.String != "" { + if t.String != "" && t.String != "0001-01-01" { t.Valid = true + } else { + t.Valid = false } return nil }