0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Fixed #bulkDestroy from calling bulkDestroy

Rather than calling itself with the newly created transaction, it would call
the "parent" method, which meant that two events were dispatched. TBH I think
we can get rid of the check for a transaction here, and so the parent method
too, but not 100% sure.
This commit is contained in:
Fabien "egg" O'Carroll 2023-09-14 12:23:42 +07:00 committed by Fabien 'egg' O'Carroll
parent 5cb914b609
commit 6de0a2bfff

View file

@ -366,7 +366,7 @@ class PostsService {
async #bulkDestroy(options) {
if (!options.transacting) {
return await this.models.Post.transaction(async (transacting) => {
return await this.bulkDestroy({
return await this.#bulkDestroy({
...options,
transacting
});