diff --git a/packages/nocodb/src/db/conditionV2.ts b/packages/nocodb/src/db/conditionV2.ts index 2f236429d8..2cee6d72c6 100644 --- a/packages/nocodb/src/db/conditionV2.ts +++ b/packages/nocodb/src/db/conditionV2.ts @@ -120,8 +120,8 @@ const parseConditionV2 = async ( // aggregated value will be either json array or `___` separated string // `gb_null` is equivalent to `blank` but for lookup it compares on aggregated value is null if ( - filter.comparison_op === 'gb_eq' || - filter.comparison_op === 'gb_null' + (filter.comparison_op as any) === 'gb_eq' || + (filter.comparison_op as any) === 'gb_null' ) { const column = await filter.getColumn(); if ( @@ -137,13 +137,13 @@ const parseConditionV2 = async ( getAlias: getAliasGenerator('__gb_filter_lk'), }); return (qb) => { - if (filter.comparison_op === 'gb_eq') + if ((filter.comparison_op as any) === 'gb_eq') qb.where(knex.raw('?', [filter.value]), lkQb.builder); else qb.whereNull(knex.raw(lkQb.builder).wrap('(', ')')); }; } else { filter.comparison_op = - filter.comparison_op === 'gb_eq' ? 'eq' : 'blank'; + (filter.comparison_op as any) === 'gb_eq' ? 'eq' : 'blank'; // if qrCode or Barcode replace it with value column if ([UITypes.QrCode, UITypes.Barcode].includes(column.uidt)) filter.fk_column_id = await column