Browse Source

Merge pull request #6763 from nocodb/fix/6702-links-alias

fix: Column meta update is not persisting the change in meta db
pull/6805/head
Raju Udava 1 year ago committed by GitHub
parent
commit
defa8d691d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      packages/nocodb/src/models/Column.ts

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

@ -27,7 +27,7 @@ import {
MetaTable,
} from '~/utils/globals';
import NocoCache from '~/cache/NocoCache';
import { stringifyMetaProp } from '~/utils/modelUtils';
import { parseMetaProp, stringifyMetaProp } from '~/utils/modelUtils';
const selectColors = [
'#cfdffe',
@ -496,13 +496,7 @@ export default class Column<T = any> implements ColumnType {
});
columnsList.forEach((column) => {
if (column.meta && typeof column.meta === 'string') {
try {
column.meta = JSON.parse(column.meta);
} catch {
column.meta = {};
}
}
column.meta = parseMetaProp(column);
});
await NocoCache.setList(CacheScope.COLUMN, [fk_model_id], columnsList);
@ -1277,7 +1271,7 @@ export default class Column<T = any> implements ColumnType {
null,
MetaTable.COLUMNS,
{
meta: stringifyMetaProp(meta),
meta: stringifyMetaProp({ meta }),
},
colId,
);

Loading…
Cancel
Save