diff --git a/volunteers/models.py b/volunteers/models.py index 252e2f6..85fab6a 100644 --- a/volunteers/models.py +++ b/volunteers/models.py @@ -539,9 +539,10 @@ def detect_dr_manhattan(self): schedule[date] = [] for task in current_tasks: for item in schedule[task.date]: + # If the times overlap, and they don't have the same name and location, then they need to be Dr Manhattan 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): + and not (item.name == task.name and item.location == task.location): retval[0] = True item_found = False for task_set in retval[1]: