diff --git a/ghost/admin/package.json b/ghost/admin/package.json index a91881f0c8..c0c86bb9db 100644 --- a/ghost/admin/package.json +++ b/ghost/admin/package.json @@ -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", diff --git a/ghost/core/core/server/models/post.js b/ghost/core/core/server/models/post.js index 4178d8abd9..e09a325b41 100644 --- a/ghost/core/core/server/models/post.js +++ b/ghost/core/core/server/models/post.js @@ -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({ diff --git a/ghost/core/package.json b/ghost/core/package.json index 2befe19c53..a625d077f5 100644 --- a/ghost/core/package.json +++ b/ghost/core/package.json @@ -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",