0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05: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:
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) .transacting(trx)
.where('author_id', authorId) .where('author_id', authorId)
.del(); .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) { } catch (err) {
throw new errors.InternalServerError({err: err}); throw new errors.InternalServerError({err: err});
} }