Browse Source

fix(nocodb): handle empty field value

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

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

@ -354,8 +354,8 @@ const parseConditionV2 = async (
{
// Condition for filter, without negation
const condition = (builder: Knex.QueryBuilder) => {
const items = val.split(',').map((item) => item.trim());
for (let i = 0; i < items.length; i++) {
const items = val?.split(',').map((item) => item.trim());
for (let i = 0; i < items?.length; i++) {
let sql;
const bindings = [field, `%,${items[i]},%`];
if (qb?.client?.config?.client === 'pg') {

Loading…
Cancel
Save