From d01ceab92f18a06bd55c2ca20d2e400be221c829 Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Tue, 9 Jan 2024 21:03:58 -0500 Subject: [PATCH] idac: remove hanging "'s" on frontend if the person viewing the page doesn't have a profile --- titles/idac/frontend.py | 9 +++++---- titles/idac/templates/idac_index.jinja | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/titles/idac/frontend.py b/titles/idac/frontend.py index 88f2b44..e331a24 100644 --- a/titles/idac/frontend.py +++ b/titles/idac/frontend.py @@ -127,10 +127,11 @@ class IDACFrontend(FE_Base): ticket_data = await self.data.item.get_tickets(user_id) rank = await self.data.profile.get_profile_rank(user_id, self.version) - tickets = { - self.ticket_names[ticket["ticket_id"]]: ticket["ticket_cnt"] - for ticket in ticket_data - } + if ticket_data: + tickets = { + self.ticket_names[ticket["ticket_id"]]: ticket["ticket_cnt"] + for ticket in ticket_data + } return Response(template.render( title=f"{self.core_config.server.name} | {self.nav_name}", diff --git a/titles/idac/templates/idac_index.jinja b/titles/idac/templates/idac_index.jinja index d6e60ef..caa7770 100644 --- a/titles/idac/templates/idac_index.jinja +++ b/titles/idac/templates/idac_index.jinja @@ -4,9 +4,10 @@ {% if sesh is defined and sesh["user_id"] > 0 %}
-
+
+ {% if profile is defined and profile is not none %}
-
+

{{ sesh["username"] }}'s Profile

@@ -18,7 +19,6 @@
- {% if profile is defined and profile is not none %}