🔀 Merge master

This commit is contained in:
Iván Ovejero
2021-11-17 10:25:05 +01:00
30 changed files with 1316 additions and 38 deletions

View File

@@ -1596,11 +1596,11 @@ class App {
const findQuery = {} as FindManyOptions;
if (req.query.filter) {
findQuery.where = JSON.parse(req.query.filter as string);
if ((findQuery.where! as IDataObject).id !== undefined) {
if (findQuery.where.id !== undefined) {
// No idea if multiple where parameters make db search
// slower but to be sure that that is not the case we
// remove all unnecessary fields in case the id is defined.
findQuery.where = { id: (findQuery.where! as IDataObject).id };
findQuery.where = { id: findQuery.where.id };
}
}