Skip to content

Commit

Permalink
feat: make logo link point to welcome page (apache#11519)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored Nov 1, 2020
1 parent e3b6dbe commit 854a461
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions superset/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,22 +257,6 @@ def json_response(

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:
Expand All @@ -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"],
Expand Down

0 comments on commit 854a461

Please sign in to comment.