Browse Source

Merge pull request #6704 from nocodb/fix/links-filter-issue

fix: Convert condition value type to string before applying any string method
pull/6710/head
Raju Udava 1 year ago committed by GitHub
parent
commit
f52205246c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/nocodb/src/db/conditionV2.ts

2
packages/nocodb/src/db/conditionV2.ts

@ -553,7 +553,7 @@ const parseConditionV2 = async (
val = `%${val}%`.replace(/^%'([\s\S]*)'%$/, '%$1%');
} else {
val =
val.startsWith('%') || val.endsWith('%') ? val : `%${val}%`;
(val + '').startsWith('%') || (val + '').endsWith('%') ? val : `%${val}%`;
}
if (qb?.client?.config?.client === 'pg') {
qb = qb.where(knex.raw('??::text ilike ?', [field, val]));

Loading…
Cancel
Save