Browse Source

fix: while validating options check for option with wrapped in single quote

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/7170/head
Pranav C 1 year ago
parent
commit
94fd44d945
  1. 2
      packages/nocodb/src/db/BaseModelSqlv2.ts

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

@ -3841,7 +3841,7 @@ class BaseModelSqlv2 {
: [columnValue];
for (let j = 0; j < columnValueArr.length; ++j) {
const val = columnValueArr[j];
if (!options.includes(val)) {
if (!options.includes(val) && !options.includes(`'${val}'`)) {
NcError.badRequest(
`Invalid option "${val}" provided for column "${columnTitle}". Valid options are "${options.join(
', ',

Loading…
Cancel
Save