From fc82f57102ae4b8f89d8ad65ae3097aba9891272 Mon Sep 17 00:00:00 2001 From: Teviot Systems Date: Fri, 2 Oct 2015 20:16:27 +1000 Subject: Pass-through post creation time when importing posts --- model/post.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'model/post.go') diff --git a/model/post.go b/model/post.go index e78469940..1fc5963c3 100644 --- a/model/post.go +++ b/model/post.go @@ -120,7 +120,10 @@ func (o *Post) PreSave() { o.OriginalId = "" - o.CreateAt = GetMillis() + if o.CreateAt == 0 { + o.CreateAt = GetMillis() + } + o.UpdateAt = o.CreateAt if o.Props == nil { -- cgit v1.2.3-1-g7c22