From 516178479354bb95c5ab840cbdb788b3396e74e6 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 29 Mar 2023 16:26:38 +0530 Subject: [PATCH] fix: fields corrections Signed-off-by: Pranav C --- .../src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts index 647c6ef601..cb0d72ceab 100644 --- a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts +++ b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts @@ -1517,10 +1517,10 @@ class BaseModelSqlv2 { const res = {}; let view: View; - let fields: string[] = []; + let fields: string[]; if (fieldsSet?.size) { - viewOrTableColumns = await this.model.getColumns(); + viewOrTableColumns = _columns || (await this.model.getColumns()); } else { view = await View.get(viewId); const viewColumns = viewId && (await View.getColumns(viewId));