Avoid errors when displaying game overview with zero sessions
All checks were successful
Django CI/CD / test (push) Successful in 1m4s
Django CI/CD / build-and-push (push) Successful in 2m10s

This commit is contained in:
2024-07-09 07:32:49 +02:00
parent 811fec4b11
commit 86f8fde8fa
3 changed files with 18 additions and 10 deletions

View File

@ -62,6 +62,7 @@
<h1 class="text-3xl mt-4 mb-1 flex gap-2 items-center">
Sessions
<span class="dark:text-slate-500" id="session-count">({{ session_count }})</span>
{% if latest_session_id %}
{% url 'view_game_start_session_from_session' latest_session_id as add_session_link %}
<a
class="truncate max-w-xs py-1 px-2 text-xs bg-green-600 hover:bg-green-700 focus:ring-green-500 focus:ring-offset-blue-200 text-white transition ease-in duration-200 text-center font-semibold shadow-md focus:outline-none focus:ring-2 focus:ring-offset-2 rounded-sm"
@ -72,6 +73,7 @@
hx-target="#session-list"
hx-swap="afterbegin"
>New</a>
{% endif %}
and Notes <span class="dark:text-slate-500">({{ sessions_with_notes_count }})</span>
</h1>
<ul id="session-list">