diff --git a/packages/nocodb/src/lib/noco-models/Column.ts b/packages/nocodb/src/lib/noco-models/Column.ts index 63d942599f..0592a79bc2 100644 --- a/packages/nocodb/src/lib/noco-models/Column.ts +++ b/packages/nocodb/src/lib/noco-models/Column.ts @@ -541,7 +541,7 @@ export default class Column implements ColumnType { title: col?.title }) ) - await FormulaColumn.update(formula.id, formula, ncMeta); + await FormulaColumn.update(formulaCol.id, formula, ncMeta); } } diff --git a/packages/nocodb/src/lib/noco/meta/api/columnApis.ts b/packages/nocodb/src/lib/noco/meta/api/columnApis.ts index 5c02957984..b00d90e6ee 100644 --- a/packages/nocodb/src/lib/noco/meta/api/columnApis.ts +++ b/packages/nocodb/src/lib/noco/meta/api/columnApis.ts @@ -649,7 +649,7 @@ export async function columnUpdate(req: Request, res: Response) { formula, [new_column] ); - await FormulaColumn.update(f.id, { + await FormulaColumn.update(c.id, { formula_raw: new_formula_raw }); }