feat: make logo link point to welcome page (#11519)

This commit is contained in:
Maxime Beauchemin 2020-11-01 09:22:09 -08:00 committed by GitHub
parent e3b6dbe62d
commit 854a4614a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"],