From ee70becff5b73c736e0706b0712c3b62e0ea7748 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Fri, 10 Nov 2023 12:23:45 +0530 Subject: [PATCH] fix: avoid applying default view filter and sort if viewId is not passed --- packages/nocodb/src/models/Model.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nocodb/src/models/Model.ts b/packages/nocodb/src/models/Model.ts index b9703569ad..ebe5ad416e 100644 --- a/packages/nocodb/src/models/Model.ts +++ b/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 { 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; }