Don't pass trx to async hook

Fixes #5460
This commit is contained in:
rijkvanzanten
2021-05-04 19:02:53 -04:00
parent eda19a8eb2
commit e67702f1b5

View File

@@ -203,7 +203,9 @@ export class ItemsService<Item extends AnyItem = AnyItem> implements AbstractSer
action: 'create',
payload,
schema: this.schema,
database: this.knex,
// This hook is called async. If we would pass the transaction here, the hook can be
// called after the transaction is done #5460
database: database,
});
}
@@ -512,7 +514,9 @@ export class ItemsService<Item extends AnyItem = AnyItem> implements AbstractSer
action: 'update',
payload,
schema: this.schema,
database: this.knex,
// This hook is called async. If we would pass the transaction here, the hook can be
// called after the transaction is done #5460
database: database,
});
}
@@ -656,7 +660,9 @@ export class ItemsService<Item extends AnyItem = AnyItem> implements AbstractSer
action: 'delete',
payload: null,
schema: this.schema,
database: this.knex,
// This hook is called async. If we would pass the transaction here, the hook can be
// called after the transaction is done #5460
database: database,
});
}