Skip to content
Snippets Groups Projects
Commit f0729721 authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Fix handling of overlapping absences with same reason and person

parent 6bf75d9c
No related branches found
No related tags found
1 merge request!52Resolve "Only allow one absence at any point of time"
......@@ -190,7 +190,7 @@ class Absence(FreeBusy):
event_within.datetime_start = min(
new_datetime_start, event_within_datetime_start
)
event_within.datetime_end = min(new_datetime_end, event_within_datetime_end)
event_within.datetime_end = max(new_datetime_end, event_within_datetime_end)
event_within.save(skip_overlap_handling=True)
else:
if (
......
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