Browse Source

Merge pull request #7287 from nocodb/fix/7284-option-validation

fix: Handle scenarios where no select options are there
pull/7300/head
աӄա 8 months ago committed by GitHub
parent
commit
d1cd85b245
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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