From 62f5790a81465592fabd239ca52297b3148fd6f8 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 9 Jul 2024 10:49:57 +0200 Subject: [PATCH] Remove unnecessary cast --- .../server/src/api/controllers/row/ExternalRequest.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/server/src/api/controllers/row/ExternalRequest.ts b/packages/server/src/api/controllers/row/ExternalRequest.ts index 46de4ec350..dfad5dcf58 100644 --- a/packages/server/src/api/controllers/row/ExternalRequest.ts +++ b/packages/server/src/api/controllers/row/ExternalRequest.ts @@ -193,15 +193,7 @@ export class ExternalRequest { for (let field of Object.keys(operator || {})) { if (dbCore.removeKeyNumbering(field) === "_id") { if (primary) { - let idField = operator[field] - try { - // Make sure _id queries decode the Row IDs - idField = JSON.parse(idField) - } catch { - // It is not a JSON value - } - - const parts = breakRowIdField(idField) + const parts = breakRowIdField(operator[field]) if (primary.length > 1) { operator[sql.Sql.COMPLEX_ID_OPERATOR] = { id: primary,