Browse Source

feat(nocodb): exclude empty string for UITypes.Time

pull/5306/head
Wing-Kam Wong 2 years ago
parent
commit
c7cb4dfe0e
  1. 8
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/conditionV2.ts

8
packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/conditionV2.ts

@ -691,7 +691,9 @@ const parseConditionV2 = async (
qb = qb.whereNull(customWhereClause || field); qb = qb.whereNull(customWhereClause || field);
if ( if (
!isNumericCol(column.uidt) && !isNumericCol(column.uidt) &&
![UITypes.Date, UITypes.DateTime].includes(column.uidt) ![UITypes.Date, UITypes.DateTime, UITypes.Time].includes(
column.uidt
)
) { ) {
qb = qb.orWhere(field, ''); qb = qb.orWhere(field, '');
} }
@ -707,7 +709,9 @@ const parseConditionV2 = async (
qb = qb.whereNotNull(customWhereClause || field); qb = qb.whereNotNull(customWhereClause || field);
if ( if (
!isNumericCol(column.uidt) && !isNumericCol(column.uidt) &&
![UITypes.Date, UITypes.DateTime].includes(column.uidt) ![UITypes.Date, UITypes.DateTime, UITypes.Time].includes(
column.uidt
)
) { ) {
qb = qb.whereNot(field, ''); qb = qb.whereNot(field, '');
} }

Loading…
Cancel
Save