Skip to content
Snippets Groups Projects
Verified Commit 86ada8fa authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Fix day variable.

parent f6b81691
No related branches found
No related tags found
No related merge requests found
...@@ -224,9 +224,9 @@ def manage_absence(request: HttpRequest) -> HttpResponse: ...@@ -224,9 +224,9 @@ def manage_absence(request: HttpRequest) -> HttpResponse:
# Mark person as absent # Mark person as absent
delta = end_date - start_date 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 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.mark_absent(day, starting_period=starting_period, absent=absent, excused=excused)
person.save() person.save()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment