Browse Source

fix: handle scenarios where no select options are there

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/7287/head
Pranav C 9 months ago
parent
commit
a9d21daa6b
  1. 10
      packages/nocodb/src/db/BaseModelSqlv2.ts

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

@ -3846,9 +3846,6 @@ class BaseModelSqlv2 {
return;
}
const options = await column
.getColOptions<{ options: SelectOption[] }>()
.then(({ options }) => options.map((opt) => opt.title));
const columnTitle = column.title;
const columnName = column.column_name;
const columnValue =
@ -3857,6 +3854,13 @@ class BaseModelSqlv2 {
return;
}
const options = await column
.getColOptions<{ options: SelectOption[] }>()
.then(
(selectOptionsMeta) =>
selectOptionsMeta?.options?.map((opt) => opt.title) || [],
);
// if multi select, then split the values
const columnValueArr =
column.uidt === UITypes.MultiSelect

Loading…
Cancel
Save