From 1052f3608421dcc43de702883b70d86f4b322e2f Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 14 Oct 2024 13:00:26 +0200 Subject: [PATCH] Fix invalid schemas while fetching --- packages/server/src/sdk/app/tables/getters.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/server/src/sdk/app/tables/getters.ts b/packages/server/src/sdk/app/tables/getters.ts index 5ff000fe12..280fb5378a 100644 --- a/packages/server/src/sdk/app/tables/getters.ts +++ b/packages/server/src/sdk/app/tables/getters.ts @@ -20,7 +20,13 @@ export async function processTable(table: Table): Promise { if (!table) { return table } + + table = { ...table } if (table._id && isExternalTableID(table._id)) { + // Old created external tables via Budibase might have a missing field name breaking some UI such as filters + if (table.schema["id"] && !table.schema["id"].name) { + table.schema["id"].name = "id" + } return { ...table, type: "table",