Removed unneeded author_id cleanup

refs https://github.com/TryGhost/Toolbox/issues/230

- As the `author_id` column is gone there's no need to cleanup the posts table when reassigning user's posts
This commit is contained in:
Naz 2022-04-27 16:22:52 +08:00 committed by naz
parent a3005dc328
commit 15951aa1d5

View File

@ -358,14 +358,6 @@ module.exports.extendModel = function extendModel(Post, Posts, ghostBookshelf) {
.transacting(trx)
.where('author_id', authorId)
.del();
// --------- secondary author cleanup END
// make the owner a primary author in post table
// remove this statement once 'author' concept is gone
await knex('posts')
.transacting(trx)
.where('author_id', authorId)
.update('author_id', ownerId);
} catch (err) {
throw new errors.InternalServerError({err: err});
}