diff --git a/packages/nocodb/src/db/conditionV2.ts b/packages/nocodb/src/db/conditionV2.ts index 732f77fc1f..fee84e6d69 100644 --- a/packages/nocodb/src/db/conditionV2.ts +++ b/packages/nocodb/src/db/conditionV2.ts @@ -453,7 +453,7 @@ const parseConditionV2 = async ( nestedQb.whereNot(field, val); if (column.uidt !== UITypes.Links) - qb.orWhereNull(customWhereClause ? _val : _field); + nestedQb.orWhereNull(customWhereClause ? _val : _field); }); } else if (column.uidt === UITypes.Rating) { // unset rating is considered as NULL @@ -476,7 +476,7 @@ const parseConditionV2 = async ( nestedQb.whereNot(field, val); if (column.uidt !== UITypes.Links) - qb.orWhereNull(customWhereClause ? _val : _field); + nestedQb.orWhereNull(customWhereClause ? _val : _field); }); } break;