Browse Source

fix: pass ncMeta for transaction

Signed-off-by: mertmit <mertmit99@gmail.com>
nc-refactor/rename-to-base-and-src
mertmit 1 year ago
parent
commit
2b5d3fe5c1
  1. 8
      packages/nocodb/src/models/Model.ts

8
packages/nocodb/src/models/Model.ts

@ -996,18 +996,18 @@ export default class Model implements TableType {
}: {
modelId: string;
},
_ncMeta = Noco.ncMeta,
ncMeta = Noco.ncMeta,
) {
const model = await this.get(modelId);
const model = await this.get(modelId, ncMeta);
let modelMeta = parseMetaProp(model);
const views = await View.list(modelId);
const views = await View.list(modelId, ncMeta);
modelMeta = {
...(modelMeta ?? {}),
hasNonDefaultViews: views.length > 1,
};
await this.updateMeta(modelId, modelMeta);
await this.updateMeta(modelId, modelMeta, ncMeta);
return modelMeta?.hasNonDefaultViews;
}

Loading…
Cancel
Save