From 94fd44d9451a97cf20c788d8dc9228415fefed78 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 6 Dec 2023 10:59:25 +0530 Subject: [PATCH] fix: while validating options check for option with wrapped in single quote Signed-off-by: Pranav C --- packages/nocodb/src/db/BaseModelSqlv2.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nocodb/src/db/BaseModelSqlv2.ts b/packages/nocodb/src/db/BaseModelSqlv2.ts index b49c80f4be..d87e6971b2 100644 --- a/packages/nocodb/src/db/BaseModelSqlv2.ts +++ b/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( ', ',