Browse Source

fix: corrections

pull/7268/head
Pranav C 1 year ago
parent
commit
106858fc61
  1. 6
      packages/nocodb/src/models/Column.ts
  2. 4
      packages/nocodb/src/models/FormulaColumn.ts

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

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

4
packages/nocodb/src/models/FormulaColumn.ts

@ -16,7 +16,7 @@ export default class FormulaColumn {
}
public static async insert(
formulaColumn: Partial<FormulaColumn & { parsed_tree?: any }>,
formulaColumn: Partial<FormulaColumn> & { parsed_tree?: any },
ncMeta = Noco.ncMeta,
) {
const insertObj = extractProps(formulaColumn, [
@ -72,7 +72,7 @@ export default class FormulaColumn {
'parsed_tree',
]);
updateObj.parsed_tree = stringifyMetaProp(insertObj, 'parsed_tree');
updateObj.parsed_tree = stringifyMetaProp(updateObj, 'parsed_tree');
// get existing cache
const key = `${CacheScope.COL_FORMULA}:${id}`;

Loading…
Cancel
Save