Browse Source

fix: avoid applying default view filter and sort if viewId is not passed

pull/6941/head
Pranav C 1 year ago
parent
commit
ee70becff5
  1. 3
      packages/nocodb/src/models/Model.ts

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

@ -381,12 +381,13 @@ export default class Model implements TableType {
viewId?: string;
dbDriver: XKnex;
model?: Model;
extractDefaultView?: boolean;
},
ncMeta = Noco.ncMeta,
): Promise<BaseModelSqlv2> {
const model = args?.model || (await this.get(args.id, ncMeta));
if (!args?.viewId) {
if (!args?.viewId && args.extractDefaultView) {
const view = await View.getDefaultView(model.id, ncMeta);
args.viewId = view.id;
}

Loading…
Cancel
Save