From 66bbc1afb8a0856d817462af75ca0b65482cab65 Mon Sep 17 00:00:00 2001
From: Jonathan Weth <git@jonathanweth.de>
Date: Fri, 16 Aug 2019 12:59:17 +0200
Subject: [PATCH] Show menu pdf for next week already an saturdays and sundays
 (issue #232)

---
 biscuit/apps/mensa/views.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/biscuit/apps/mensa/views.py b/biscuit/apps/mensa/views.py
index fc2bfe2..ba9effb 100644
--- a/biscuit/apps/mensa/views.py
+++ b/biscuit/apps/mensa/views.py
@@ -1,5 +1,6 @@
 import datetime
 import os
+import time
 
 from django.contrib.auth.decorators import login_required, permission_required
 from django.http import FileResponse
@@ -66,6 +67,9 @@ def show_current(request):
     if days_to_add < 0:
         days_to_add = days_to_add + 7
 
+    if days_to_add == 6 or days_to_add == 7:
+        calendar_week += 1
+
     # Create datetime with next friday and time 14:10
     friday = current_date + datetime.timedelta(days=days_to_add)
     friday_14_10 = timezone.datetime(friday.year, friday.month, friday.day, 14, 10)
-- 
GitLab