Disabled after hook for members newsletters pivot table

refs https://github.com/TryGhost/Team/issues/1469

We have an after hook to update `sort_order` for pivot tables after update as base bookshelf plugin. Since new `members_newsletters` table doesn't has a `sort_order` column on it, this change disables the after hook for it to avoid errors.
This commit is contained in:
Rishabh 2022-04-05 14:37:33 +05:30 committed by Rishabh Garg
parent 16f35df448
commit 473775788d

View File

@ -78,7 +78,7 @@ ghostBookshelf.plugin('bookshelf-relations', {
};
// CASE: disable after hook for specific relations
if (['permissions_roles'].indexOf(existing.relatedData.joinTableName) !== -1) {
if (['permissions_roles', 'members_newsletters'].indexOf(existing.relatedData.joinTableName) !== -1) {
return Promise.resolve();
}