Browse Source

fix: handle different format of blank and notblank

pull/6935/head
Pranav C 1 year ago
parent
commit
4e31c9801b
  1. 23
      packages/nocodb/src/db/BaseModelSqlv2.ts

23
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -5013,6 +5013,29 @@ export function extractCondition(
[logicOp, alias, op, value] =
str.match(/(?:~(and|or|not))?\((.*?),(\w+)\)/)?.slice(1) || [];
}
// handle isblank and isnotblank filter format
switch (op) {
case 'is':
if (value === 'blank') {
op = 'blank';
value = undefined;
} else if (value === 'notblank') {
op = 'notblank';
value = undefined;
}
break;
case 'isblank':
case 'is_blank':
op = 'blank';
break;
case 'isnotblank':
case 'is_not_blank':
case 'is_notblank':
op = 'notblank';
break;
}
let sub_op = null;
if (aliasColObjMap[alias]) {

Loading…
Cancel
Save