From 86ada8fad4c6669a91ab59bd28c1375c846a87ab Mon Sep 17 00:00:00 2001 From: Tom Teichler <tom.teichler@teckids.org> Date: Tue, 19 Nov 2019 23:24:09 +0100 Subject: [PATCH] Fix day variable. --- biscuit/apps/alsijil/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/biscuit/apps/alsijil/views.py b/biscuit/apps/alsijil/views.py index 5f6048253..0b3f9da01 100644 --- a/biscuit/apps/alsijil/views.py +++ b/biscuit/apps/alsijil/views.py @@ -224,9 +224,9 @@ def manage_absence(request: HttpRequest) -> HttpResponse: # Mark person as absent delta = end_date - start_date - for i in range(delta.days): + for i in range(delta.days+1): starting_period = starting_lesson if i == 0 else 0 - day = start_date + timedelta(days=1) + day = start_date + timedelta(days=i) person.mark_absent(day, starting_period=starting_period, absent=absent, excused=excused) person.save() -- GitLab