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