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:
Nicola Krumschmidt
2020-10-28 00:33:53 +01:00
parent e61429fc66
commit 8b601c5b60
3 changed files with 18 additions and 7 deletions

View File

@@ -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;
}