aboutsummaryrefslogtreecommitdiff
path: root/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'views.py')
-rw-r--r--views.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/views.py b/views.py
index 46c6ca7..6204d9f 100644
--- a/views.py
+++ b/views.py
@@ -36,7 +36,9 @@ def index(request):
def timetable(request, group_slug, year=None, week=None):
if year is None or week is None:
- year, week, _ = timezone.now().isocalendar()
+ year, week, day = timezone.now().isocalendar()
+ if day >= 6:
+ year, week, _ = (timezone.now() + datetime.timedelta(weeks=1)).isocalendar()
start, end = get_week(int(year), int(week))