diff --git a/program/services.py b/program/services.py index 59c5b86b652a539a729a5fcd8d15bb95c946cc6c..038f3089355ef1c27a12053364a1d317225fa423 100644 --- a/program/services.py +++ b/program/services.py @@ -668,7 +668,7 @@ def generate_conflicts(timeslots: list[TimeSlot]) -> Conflicts: solution_choices.add("theirs") solution_choices.add("ours") - # Partly overlapping: projected starts earlier than existing and ends earlier + # Partly overlapping: timeslot start before existing start, end before existing end # # ex. pr. # +--+ @@ -678,11 +678,11 @@ def generate_conflicts(timeslots: list[TimeSlot]) -> Conflicts: # | | # +--+ # - if timeslot.end > existing.start > timeslot.start <= existing.end: + if timeslot.start < existing.start and timeslot.end < existing.end: solution_choices.add("theirs-end") solution_choices.add("ours-end") - # Partly overlapping: projected starts later than existing and ends later + # Partly overlapping: timeslot start after existing start, end after existing ends # # ex. pr. # +--+ @@ -692,11 +692,11 @@ def generate_conflicts(timeslots: list[TimeSlot]) -> Conflicts: # | | # +--+ # - if existing.start <= timeslot.start < existing.end < timeslot.end: + if timeslot.start > existing.start and timeslot.end > existing.end: solution_choices.add("theirs-start") solution_choices.add("ours-start") - # Fully overlapping/Superset: projected starts earlier and ends later than existing + # Fully overlapping: timeslot start before existing start, end after existing end # # ex. pr. # +--+ @@ -710,7 +710,7 @@ def generate_conflicts(timeslots: list[TimeSlot]) -> Conflicts: solution_choices.add("theirs-start") solution_choices.add("theirs-both") - # Fully overlapping/Subset: projected starts later and ends earlier than existing + # Fully overlapping: timeslot start after existing start, end before existing end # # ex. pr. # +--+