From 5c43b13c1e5134d1437d4eaccfcad3967890899b Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" <70410625+michael-s-molina@users.noreply.github.com> Date: Tue, 9 Sep 2025 11:50:49 -0300 Subject: [PATCH] fix: Change database event in core (#35071) (cherry picked from commit 4c2b27e7f09513d09306d2297791387cbb88275b) --- superset-frontend/src/core/sqlLab.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/core/sqlLab.ts b/superset-frontend/src/core/sqlLab.ts index 8f374dea1be..719d984fc49 100644 --- a/superset-frontend/src/core/sqlLab.ts +++ b/superset-frontend/src/core/sqlLab.ts @@ -102,8 +102,11 @@ export const onDidChangeEditorDatabase: typeof sqlLabType.onDidChangeEditorDatab createActionListener( predicate(QUERY_EDITOR_SETDB), listener, - (action: { type: string; queryEditor: { dbId: number } }) => - action.queryEditor.dbId, + (action: { + type: string; + dbId?: number; + queryEditor: { dbId: number }; + }) => action.dbId || action.queryEditor.dbId, thisArgs, );