0
Fork 0
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:
Ghost CI 2023-06-21 03:32:58 +00:00
commit 5dadaea515
3 changed files with 7 additions and 3 deletions

View file

@ -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",

View file

@ -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({

View file

@ -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",