Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make logo link point to welcome page #11519

Merged
merged 1 commit into from
Nov 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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