From 4eea2223dad90ee3f384951afab55cae92c369f4 Mon Sep 17 00:00:00 2001
From: Dominik George <nik@naturalnet.de>
Date: Mon, 16 Sep 2019 14:28:33 +0200
Subject: [PATCH] Guard button against missing group selection.

---
 biscuit/apps/alsijil/templates/alsijil/group_week.html | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/biscuit/apps/alsijil/templates/alsijil/group_week.html b/biscuit/apps/alsijil/templates/alsijil/group_week.html
index 4497bd7e8..048bc6537 100644
--- a/biscuit/apps/alsijil/templates/alsijil/group_week.html
+++ b/biscuit/apps/alsijil/templates/alsijil/group_week.html
@@ -15,9 +15,11 @@
         {% blocktrans %}Select{% endblocktrans %}
       </button>
     </form>
-    <a class="btn btn-secondary" href="{% url 'full_register_group' group.id %}">
-      {% fa 'print' %}
-    </a>
+    {% if group %}
+      <a class="btn btn-secondary" href="{% url 'full_register_group' group.id %}">
+        {% fa 'print' %}
+      </a>
+    {% endif %}
   </div>
 
   {% if group %}
-- 
GitLab