From 4eac6522f9b049d33f74f8d582d38e680f7adcfa Mon Sep 17 00:00:00 2001
From: Dominik George <nik@naturalnet.de>
Date: Sun, 27 Oct 2019 21:31:36 +0100
Subject: [PATCH] Fix check for existing lessons in week view.

---
 biscuit/apps/alsijil/templates/alsijil/week_view.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/biscuit/apps/alsijil/templates/alsijil/week_view.html b/biscuit/apps/alsijil/templates/alsijil/week_view.html
index 48150c4ef..5b4949504 100644
--- a/biscuit/apps/alsijil/templates/alsijil/week_view.html
+++ b/biscuit/apps/alsijil/templates/alsijil/week_view.html
@@ -22,7 +22,7 @@
     {% endif %}
   </div>
 
-  {% if group or teacher or room %}
+  {% if lesson_periods.count %}
     <div class="row">
       <div class="col-md-7">
         <div class="card">
@@ -115,7 +115,7 @@
       <div class="card-body">
         <p>
           {% blocktrans %}
-            You must select a group, a teacher or a room to see the week summary.
+            There are no lessons for the selected group, teacher, room or time.
           {% endblocktrans %}
         </p>
       </div>
-- 
GitLab