mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Merged v5.52.2 into main
This commit is contained in:
commit
5dadaea515
3 changed files with 7 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ghost-admin",
|
||||
"version": "5.52.1",
|
||||
"version": "5.52.2",
|
||||
"description": "Ember.js admin client for Ghost",
|
||||
"author": "Ghost Foundation",
|
||||
"homepage": "http://ghost.org",
|
||||
|
|
|
@ -875,7 +875,11 @@ Post = ghostBookshelf.Model.extend({
|
|||
revision_interval_ms: POST_REVISIONS_INTERVAL_MS
|
||||
}
|
||||
});
|
||||
const authorId = this.contextUser(options);
|
||||
let authorId = this.contextUser(options);
|
||||
const authorExists = await ghostBookshelf.model('User').findOne({id: authorId}, {transacting: options.transacting});
|
||||
if (!authorExists) {
|
||||
authorId = await ghostBookshelf.model('User').getOwnerUser().get('id');
|
||||
}
|
||||
ops.push(async function updateRevisions() {
|
||||
const revisionModels = await ghostBookshelf.model('PostRevision')
|
||||
.findAll(Object.assign({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ghost",
|
||||
"version": "5.52.1",
|
||||
"version": "5.52.2",
|
||||
"description": "The professional publishing platform",
|
||||
"author": "Ghost Foundation",
|
||||
"homepage": "https://ghost.org",
|
||||
|
|
Loading…
Add table
Reference in a new issue