From 854a4614a82c489422e1cc588cb85955802bd0a2 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Sun, 1 Nov 2020 09:22:09 -0800 Subject: [PATCH] feat: make logo link point to welcome page (#11519) --- superset/views/base.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/superset/views/base.py b/superset/views/base.py index 3eb330cab6..a5ead2c692 100644 --- a/superset/views/base.py +++ b/superset/views/base.py @@ -257,22 +257,6 @@ class BaseSupersetView(BaseView): def menu_data() -> Dict[str, Any]: menu = appbuilder.menu.get_data() - root_path = "#" - logo_target_path = "" - if not g.user.is_anonymous: - try: - logo_target_path = ( - appbuilder.app.config["LOGO_TARGET_PATH"] - or f"/profile/{g.user.username}/" - ) - # when user object has no username - except NameError as ex: - logger.exception(ex) - - if logo_target_path.startswith("/"): - root_path = f"/superset{logo_target_path}" - else: - root_path = logo_target_path languages = {} for lang in appbuilder.languages: @@ -283,7 +267,7 @@ def menu_data() -> Dict[str, Any]: return { "menu": menu, "brand": { - "path": root_path, + "path": appbuilder.app.config["LOGO_TARGET_PATH"] or "/", "icon": appbuilder.app_icon, "alt": appbuilder.app_name, "width": appbuilder.app.config["APP_ICON_WIDTH"],