From 7d8238ec9830b76017239e6bf82d871794a3df98 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 30 Sep 2024 15:40:21 +0200 Subject: [PATCH] Fix --- packages/server/src/sdk/app/rows/search.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/src/sdk/app/rows/search.ts b/packages/server/src/sdk/app/rows/search.ts index c09c625085..f5a4957d54 100644 --- a/packages/server/src/sdk/app/rows/search.ts +++ b/packages/server/src/sdk/app/rows/search.ts @@ -69,6 +69,8 @@ export async function search( throw new Error(`Must supply either a view ID or a table ID`) } + const isExternalTable = isExternalTableID(table._id!) + if (options.query) { const visibleFields = ( options.fields || Object.keys(table.schema) @@ -142,7 +144,6 @@ export async function search( options = searchInputMapping(table, options) - const isExternalTable = isExternalTableID(table._id!) let result: SearchResponse if (isExternalTable) { span?.addTags({ searchType: "external" })