From e2469162fa074af229ff97e845755caf1a29ca0d Mon Sep 17 00:00:00 2001 From: AAfghahi <48933336+AAfghahi@users.noreply.github.com> Date: Mon, 30 Aug 2021 20:04:10 -0400 Subject: [PATCH] fix: select database fix (#16472) * select database fix * made a backend change --- superset/views/core.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/superset/views/core.py b/superset/views/core.py index d7e626e261b64..6ec0709f6fef5 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -3004,12 +3004,12 @@ def _get_sqllab_tabs(user_id: int) -> Dict[str, Any]: .first() ) - databases: Dict[int, Any] = { - database.id: { + databases: Dict[int, Any] = {} + for database in DatabaseDAO.find_all(): + databases[database.id] = { k: v for k, v in database.to_json().items() if k in DATABASE_KEYS } - for database in DatabaseDAO.find_all() - } + databases[database.id]["backend"] = database.backend queries: Dict[str, Any] = {} # These are unnecessary if sqllab backend persistence is disabled