mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-02 15:55:08 +03:00
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:
parent
a3005dc328
commit
15951aa1d5
@ -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});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user