Browse Source

fix: use same key while grouping insert records

pull/9097/head
Pranav C 4 months ago
parent
commit
422c9c46ed
  1. 8
      packages/nocodb/src/models/Column.ts

8
packages/nocodb/src/models/Column.ts

@ -1565,13 +1565,13 @@ export default class Column<T = any> implements ColumnType {
const insertGroups = new Map<UITypes, Record<string, any>[]>(); const insertGroups = new Map<UITypes, Record<string, any>[]>();
for (const column of columns) { for (const column of columns) {
let insertArr = insertGroups.get( const groupKey =
column.uidt === UITypes.MultiSelect column.uidt === UITypes.MultiSelect
? UITypes.SingleSelect ? UITypes.SingleSelect
: column.uidt, : column.uidt;
); let insertArr = insertGroups.get(groupKey);
if (!insertArr) { if (!insertArr) {
insertGroups.set(column.uidt, (insertArr = [])); insertGroups.set(groupKey, (insertArr = []));
} }
switch (column.uidt || column.ui_data_type) { switch (column.uidt || column.ui_data_type) {
case UITypes.Lookup: case UITypes.Lookup:

Loading…
Cancel
Save