mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Pass knex instance to applyFilter
This fixes a regression introduced in #786. When using a SQLite database, items could not be updated any more. This is due to knex by default only allowing a single connection for SQLite databases and the item update operation using applyFilter inside a transaction which tries to use a different knex instance to connect to the database.
This commit is contained in:
@@ -164,7 +164,7 @@ async function getDBQuery(
|
||||
|
||||
query.sort = query.sort || [{ column: primaryKeyField, order: 'asc' }];
|
||||
|
||||
await applyQuery(table, dbQuery, queryCopy);
|
||||
await applyQuery(knex, table, dbQuery, queryCopy);
|
||||
|
||||
return dbQuery;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user