From 958cff6c37d9ab27b683b628bf6a55c12f178bb4 Mon Sep 17 00:00:00 2001 From: Victoria Earl Date: Wed, 27 Nov 2024 17:15:37 +0100 Subject: [PATCH] Fix 500 errors for MIVS admin pages --- uber/templates/mivs_admin/index.html | 2 +- uber/templates/mivs_admin/studios.html | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/uber/templates/mivs_admin/index.html b/uber/templates/mivs_admin/index.html index 2fea62dad..67bed6ca0 100644 --- a/uber/templates/mivs_admin/index.html +++ b/uber/templates/mivs_admin/index.html @@ -65,7 +65,7 @@

MIVS Submitted Games

{% if game.status == c.ACCEPTED and not game.confirmed %}Confirm deadline: {{ game.studio.confirm_deadline|datetime_local('%x %-I:%M%p') }}{% endif %} {{ game.studio.name }} - {{ game.studio.primary_contacts[0].full_name }} + {{ game.studio.primary_contacts[0].full_name if game.studio.primary_contacts else 'N/A' }} {{ game.reviews|length }} {% if game.game_reviews %} diff --git a/uber/templates/mivs_admin/studios.html b/uber/templates/mivs_admin/studios.html index 3ae351b4a..ef12d8f7a 100644 --- a/uber/templates/mivs_admin/studios.html +++ b/uber/templates/mivs_admin/studios.html @@ -26,17 +26,21 @@

{{ studio.name }} - {%- if studio.primary_contacts[0].attendee -%} - {{ studio.primary_contacts[0].full_name }} - {%- else -%} - {{ studio.primary_contacts[0].full_name }} - {%- endif %} -
- {{ studio.primary_contacts[0].email }} - {% if studio.primary_contacts[0].cellphone_num -%} + {% if studio.primary_contacts %} + {%- if studio.primary_contacts[0].attendee -%} + {{ studio.primary_contacts[0].full_name }} + {%- elif studio.primary_contacts -%} + {{ studio.primary_contacts[0].full_name }} + {%- endif %}
- {{ studio.primary_contacts[0].cellphone_num }} - {%- endif %} + {{ studio.primary_contacts[0].email }} + {% if studio.primary_contacts[0].cellphone_num -%} +
+ {{ studio.primary_contacts[0].cellphone_num }} + {% else %} + No primary contacts~ + {%- endif %} + {% endif %} {{ studio.website|url_to_link(is_relative=False) }}