Skip to content

Commit

Permalink
Merge pull request FOSDEM#87 from Danyc0/fix-dr-manhattan
Browse files Browse the repository at this point in the history
Stop DrManhattan catching overlapping but identically named tasks
  • Loading branch information
Danyc0 authored Feb 9, 2024
2 parents 88e503a + 1b85bb6 commit 79a3ae9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions volunteers/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,9 @@ def detect_dr_manhattan(self):
schedule[date] = []
for task in current_tasks:
for item in schedule[task.date]:
if item.start_time <= task.start_time < item.end_time \
or item.start_time < task.end_time <= item.end_time:
if (item.start_time <= task.start_time < item.end_time \
or item.start_time < task.end_time <= item.end_time) \
and (item.name != task.name and item.location != task.location):
retval[0] = True
item_found = False
for task_set in retval[1]:
Expand Down

0 comments on commit 79a3ae9

Please sign in to comment.