From cdd2d9c0d34a24ae273011386b7aef846e5a6315 Mon Sep 17 00:00:00 2001 From: Keeper Date: Mon, 18 Nov 2024 12:38:29 +0300 Subject: [PATCH] =?UTF-8?q?r30495=20=D0=9F=D0=BE=D0=B4=D0=B4=D0=B5=D1=80?= =?UTF-8?q?=D0=B6=D0=BA=D0=B0=20IS=20NULL=20=D0=B2=D0=BE=20=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B6=D0=B5=D0=BD=D0=BD=D1=8B=D1=85=20=D1=83=D1=81=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=D0=B8=D1=8F=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content/Handler/HTTP/Ext/w2ui/Filter.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Content/Handler/HTTP/Ext/w2ui/Filter.js b/Content/Handler/HTTP/Ext/w2ui/Filter.js index 37a1d73c..bfa8239f 100644 --- a/Content/Handler/HTTP/Ext/w2ui/Filter.js +++ b/Content/Handler/HTTP/Ext/w2ui/Filter.js @@ -26,7 +26,7 @@ module.exports = class { return term; } if (term.field === undefined && Array.isArray(term.value)) { - return term.value.map(sub => this.get_params(sub)).reduce((acc, val) => acc.concat(val), []); + return term.value.map(sub => this.get_params(sub)).filter(v => v !== undefined).reduce((acc, val) => acc.concat(val), []); } return term.value; @@ -129,6 +129,10 @@ module.exports = class { if (IN_SET_OPERATORS.has(s.operator)) { s.expr += `(${s.value.map(() => '?').join(',')})`; } + if (s.operator == 'null') { + s.expr += ' IS NULL'; + s.value = undefined; + } } }