diff --git a/store/app.py b/store/app.py index 134319e..97bdbe1 100644 --- a/store/app.py +++ b/store/app.py @@ -416,7 +416,7 @@ def sso_login_callback(): session["user"] = { "id": user_data["external_id"][0], "username": user_data["username"][0], - "avatar_url": user_data["avatar_url"][0], + "avatar_url": user_data["avatar_url"][0] if "avatar_url" in user_data else "", } if uri_to_redirect_to_after_login: diff --git a/store/templates/base.html b/store/templates/base.html index ecc5afd..09901b8 100644 --- a/store/templates/base.html +++ b/store/templates/base.html @@ -60,15 +60,17 @@ type="button" class="group flex shrink-0 items-center rounded-md transition" > + {% if user['avatar_url'] %} Avatar -

+ {% endif %} +

{{ user['username'] }}

- +