From 6a154ee9b0a7a6b3239813404538a5a9934228e4 Mon Sep 17 00:00:00 2001 From: Ignatz Date: Thu, 14 Jun 2018 12:56:29 +0200 Subject: correcting error in advanced filter --- client/lib/filter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/lib/filter.js') diff --git a/client/lib/filter.js b/client/lib/filter.js index 1ea67f4b..ea1811de 100644 --- a/client/lib/filter.js +++ b/client/lib/filter.js @@ -224,7 +224,7 @@ class AdvancedFilter { { const field = commands[i - 1].cmd; const str = commands[i + 1].cmd; - commands[i] = { 'customFields._id': this._fieldNameToId(field), 'customFields.value': {$in: [this._fieldValueToId(str), parseInt(str, 10)]} }; + commands[i] = { 'customFields._id': this._fieldNameToId(field), 'customFields.value': {$in: [this._fieldValueToId(field, str), parseInt(str, 10)]} }; commands.splice(i - 1, 1); commands.splice(i, 1); //changed = true; @@ -236,7 +236,7 @@ class AdvancedFilter { { const field = commands[i - 1].cmd; const str = commands[i + 1].cmd; - commands[i] = { 'customFields._id': this._fieldNameToId(field), 'customFields.value': { $not: {$in: [this._fieldValueToId(str), parseInt(str, 10)]} } }; + commands[i] = { 'customFields._id': this._fieldNameToId(field), 'customFields.value': { $not: {$in: [this._fieldValueToId(field, str), parseInt(str, 10)]} } }; commands.splice(i - 1, 1); commands.splice(i, 1); //changed = true; -- cgit v1.2.3-1-g7c22