mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-22 16:38:21 +00:00
allow null value comparision only with is
This commit is contained in:
parent
a160e49647
commit
da29b52e13
2 changed files with 4 additions and 4 deletions
|
|
@ -60,7 +60,7 @@ async function listRows(queryOptions, organizationId, currentState) {
|
|||
return {
|
||||
status: 'failed',
|
||||
statusText: 'failed',
|
||||
message: 'Null value comparison not allowed with equal/not equal operator, Please use IS operator instead.',
|
||||
message: 'Null value comparison not allowed, To check null values Please use IS operator instead.',
|
||||
description: 'Is operator should be used with null value comparision.',
|
||||
data: {},
|
||||
};
|
||||
|
|
@ -105,7 +105,7 @@ async function updateRows(queryOptions, organizationId, currentState) {
|
|||
return {
|
||||
status: 'failed',
|
||||
statusText: 'failed',
|
||||
message: 'Null value comparison not allowed with equal/not equal operator, Please use IS operator instead.',
|
||||
message: 'Null value comparison not allowed, To check null values Please use IS operator instead.',
|
||||
description: 'Is operator should be used with null value comparision.',
|
||||
data: {},
|
||||
};
|
||||
|
|
@ -131,7 +131,7 @@ async function deleteRows(queryOptions, organizationId, currentState) {
|
|||
return {
|
||||
status: 'failed',
|
||||
statusText: 'failed',
|
||||
message: 'Null value comparison not allowed with equal/not equal operator, Please use IS operator instead.',
|
||||
message: 'Null value comparison not allowed, To check null values Please use IS operator instead.',
|
||||
description: 'Is operator should be used with null value comparision.',
|
||||
data: {},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export const hasEqualWithNull = (queryOptions, operation) => {
|
|||
const filterKeys = Object.keys(filters);
|
||||
for (let i = 0; i < filterKeys.length; i++) {
|
||||
const filter = filters[filterKeys[i]];
|
||||
if ((filter.operator === 'eq' || filter.operator === 'neq') && filter.value === null) {
|
||||
if (filter.operator !== 'is' && filter.value === null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue