From 0dc48e9b416c73e445a91881d89ca96ffddce141 Mon Sep 17 00:00:00 2001 From: Beto Dealmeida Date: Tue, 15 Jul 2025 18:43:34 -0400 Subject: [PATCH] fix(sqllab): pass DB id instead of name (#33955) --- .../src/components/DatabaseSelector/DatabaseSelector.test.tsx | 2 +- superset-frontend/src/components/DatabaseSelector/index.tsx | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/superset-frontend/src/components/DatabaseSelector/DatabaseSelector.test.tsx b/superset-frontend/src/components/DatabaseSelector/DatabaseSelector.test.tsx index e24ce99c1ab..f8d0425c5e6 100644 --- a/superset-frontend/src/components/DatabaseSelector/DatabaseSelector.test.tsx +++ b/superset-frontend/src/components/DatabaseSelector/DatabaseSelector.test.tsx @@ -353,7 +353,7 @@ test('Sends the correct db when changing the database', async () => { await waitFor(() => expect(props.onDbChange).toHaveBeenCalledWith( expect.objectContaining({ - id: `mysql-test-mysql-2`, + value: 2, database_name: 'test-mysql', backend: 'mysql', }), diff --git a/superset-frontend/src/components/DatabaseSelector/index.tsx b/superset-frontend/src/components/DatabaseSelector/index.tsx index 7f7eb792bdb..87b915f7846 100644 --- a/superset-frontend/src/components/DatabaseSelector/index.tsx +++ b/superset-frontend/src/components/DatabaseSelector/index.tsx @@ -196,7 +196,6 @@ export function DatabaseSelector({ /> ), value: row.id, - id: `${row.backend}-${row.database_name}-${row.id}`, database_name: row.database_name, backend: row.backend, allow_multi_catalog: row.allow_multi_catalog,