Browse Source

fix: incorrect IDs when calling FormulaColumn.update

pull/2160/head
Wing-Kam Wong 3 years ago
parent
commit
ab32efbc91
  1. 2
      packages/nocodb/src/lib/noco-models/Column.ts
  2. 2
      packages/nocodb/src/lib/noco/meta/api/columnApis.ts

2
packages/nocodb/src/lib/noco-models/Column.ts

@ -541,7 +541,7 @@ export default class Column<T = any> implements ColumnType {
title: col?.title
})
)
await FormulaColumn.update(formula.id, formula, ncMeta);
await FormulaColumn.update(formulaCol.id, formula, ncMeta);
}
}

2
packages/nocodb/src/lib/noco/meta/api/columnApis.ts

@ -649,7 +649,7 @@ export async function columnUpdate(req: Request, res: Response<TableType>) {
formula,
[new_column]
);
await FormulaColumn.update(f.id, {
await FormulaColumn.update(c.id, {
formula_raw: new_formula_raw
});
}

Loading…
Cancel
Save