Browse Source

fix: add order to column if missing

pull/7455/head
mertmit 11 months ago
parent
commit
3698203125
  1. 7
      packages/nocodb/src/models/Column.ts

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

@ -153,6 +153,13 @@ export default class Column<T = any> implements ColumnType {
if (insertObj.meta && typeof insertObj.meta === 'object') { if (insertObj.meta && typeof insertObj.meta === 'object') {
insertObj.meta = JSON.stringify(insertObj.meta); insertObj.meta = JSON.stringify(insertObj.meta);
} }
insertObj.order =
column.order ??
(await ncMeta.metaGetNextOrder(MetaTable.COLUMNS, {
fk_model_id: column.fk_model_id,
}));
if (column.validate) { if (column.validate) {
if (typeof column.validate === 'string') if (typeof column.validate === 'string')
insertObj.validate = column.validate; insertObj.validate = column.validate;

Loading…
Cancel
Save