def time_conflict(self, schedule): """Internal use. Determines when the given time range conflicts with the set of excluded time ranges. """ if is_nil(schedule): return True for timerange in self._excluded_times: if timerange.conflicts_with(schedule): return False return True
def section_constraint(section1, section2): return is_nil(section1) or is_nil(section2) or not section1.conflicts_with(section2)
def section_constraint(section1, section2): if is_nil(section1) or is_nil(section2): return True return not section1.conflicts_with(section2)
def __call__(self, section1, section2): if is_nil(section1) or is_nil(section2): return True self.section_conflicts(section1.id, section2.id)