Ignore post `created` date when empty on publish
This commit is contained in:
parent
2a0298cd46
commit
3270470b68
|
@ -661,7 +661,7 @@ func (db *datastore) CreatePost(userID, collID int64, post *SubmittedPost) (*Pos
|
|||
// SQLite stores datetimes in UTC, so convert time.Now() to it here
|
||||
created = created.UTC()
|
||||
}
|
||||
if post.Created != nil {
|
||||
if post.Created != nil && *post.Created != "" {
|
||||
created, err = time.Parse("2006-01-02T15:04:05Z", *post.Created)
|
||||
if err != nil {
|
||||
log.Error("Unable to parse Created time '%s': %v", *post.Created, err)
|
||||
|
|
Loading…
Reference in New Issue