From c0bb03e9382ac16c14c0fd29537d443e8126dd94 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 27 Feb 2024 09:58:06 +0000 Subject: [PATCH] Adding length check back for get row. --- packages/server/src/api/controllers/row/ExternalRequest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/row/ExternalRequest.ts b/packages/server/src/api/controllers/row/ExternalRequest.ts index dceadb3cd4..165a1847b5 100644 --- a/packages/server/src/api/controllers/row/ExternalRequest.ts +++ b/packages/server/src/api/controllers/row/ExternalRequest.ts @@ -346,7 +346,7 @@ export class ExternalRequest { endpoint: getEndpoint(table._id!, Operation.READ), filters: buildFilters(rowId, {}, table), }) - if (Array.isArray(response)) { + if (Array.isArray(response) && response.length > 0) { return response[0] } else { throw new Error(`Cannot fetch row by ID "${rowId}"`)