mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
Merge pull request #2038 from ErisDS/issue-2015
Improvement for published posts with no published_at
This commit is contained in:
commit
6efc8ffed2
@ -61,6 +61,9 @@ Post = ghostBookshelf.Model.extend({
|
||||
}
|
||||
// This will need to go elsewhere in the API layer.
|
||||
this.set('published_by', 1);
|
||||
} else if (this.get('status') === 'published' && !this.get('published_at')) {
|
||||
// If somehow this is a published post with no date, fix it... see #2015
|
||||
this.set('published_at', new Date());
|
||||
}
|
||||
|
||||
ghostBookshelf.Model.prototype.saving.call(this);
|
||||
|
Loading…
Reference in New Issue
Block a user