mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix before hook items transaction (#5136)
Since we might need information from database, we must provide the current transaction, instead of the connection. Otherwise, databases like SQLite which only accepts a single connection will throw an error of knex timeout. Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
This commit is contained in:
@@ -70,7 +70,7 @@ export class ItemsService<Item extends AnyItem = AnyItem> implements AbstractSer
|
||||
action: 'create',
|
||||
payload: payloads[i],
|
||||
schema: this.schema,
|
||||
database: this.knex,
|
||||
database: trx,
|
||||
});
|
||||
|
||||
if (customProcessed && customProcessed.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user