From 6f19d32d5e50527b7588e771a6ee22ff7b1985c0 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 10 Feb 2023 12:24:31 +0800 Subject: [PATCH] feat(nocodb): include blank & notblank --- packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts | 2 ++ packages/nocodb/src/lib/models/Filter.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts b/packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts index 43fdc6c8c5..c4bb18807d 100644 --- a/packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts +++ b/packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts @@ -54,12 +54,14 @@ export async function validateCondition(filters: Filter[], data: any) { -1; break; case 'empty': + case 'blank': res = data[field] === '' || data[field] === null || data[field] === undefined; break; case 'notempty': + case 'notblank': res = !( data[field] === '' || data[field] === null || diff --git a/packages/nocodb/src/lib/models/Filter.ts b/packages/nocodb/src/lib/models/Filter.ts index d6683d82f1..899881d8dc 100644 --- a/packages/nocodb/src/lib/models/Filter.ts +++ b/packages/nocodb/src/lib/models/Filter.ts @@ -34,6 +34,8 @@ export default class Filter { | 'notnull' | 'checked' | 'notchecked' + | 'blank' + | 'notblank' | 'allof' | 'anyof' | 'nallof'