From f6b81691438f96dbaacea6668476a12aef384baf Mon Sep 17 00:00:00 2001
From: Tom Teichler <tom.teichler@teckids.org>
Date: Tue, 19 Nov 2019 23:19:09 +0100
Subject: [PATCH] Fix range of dates.

---
 biscuit/apps/alsijil/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/biscuit/apps/alsijil/views.py b/biscuit/apps/alsijil/views.py
index f18dd9d57..5f6048253 100644
--- a/biscuit/apps/alsijil/views.py
+++ b/biscuit/apps/alsijil/views.py
@@ -224,7 +224,7 @@ def manage_absence(request: HttpRequest) -> HttpResponse:
 
             # Mark person as absent
             delta = end_date - start_date
-            for i in range(delta.days+1):
+            for i in range(delta.days):
                 starting_period = starting_lesson if i == 0 else 0
                 day = start_date + timedelta(days=1)
                 person.mark_absent(day, starting_period=starting_period, absent=absent, excused=excused)
-- 
GitLab