From c467598895893aeba06dadf1f2a560173dc7203d Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 13 Jun 2024 21:05:59 +0000 Subject: [PATCH] refactor: review suggestions --- packages/nocodb/src/models/Model.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/nocodb/src/models/Model.ts b/packages/nocodb/src/models/Model.ts index 03ac425610..40a3248635 100644 --- a/packages/nocodb/src/models/Model.ts +++ b/packages/nocodb/src/models/Model.ts @@ -237,11 +237,6 @@ export default class Model implements TableType { let { list: modelList } = cachedList; const { isNoneList } = cachedList; - let condition; - if(source_id){ - condition = { source_id } - } - if (!isNoneList && !modelList.length) { modelList = await ncMeta.metaList2( context.workspace_id, @@ -251,7 +246,7 @@ export default class Model implements TableType { orderBy: { order: 'asc', }, - condition, + ...(source_id ? { condition: { source_id } } : {}), }, );