- Fix bug where always getting disabled by non-active schedules

This commit is contained in:
nwithan8 2024-01-21 23:41:16 -07:00
parent bf2e61ce40
commit 85ef1232d8

View File

@ -115,9 +115,13 @@ class ScheduleManager:
def all_schedules_except_always(self) -> List[ScheduleEntry]:
return self.weekly_schedules + self.monthly_schedules + self.date_range_schedules
@property
def all_valid_schedule_except_always(self) -> List[ScheduleEntry]:
return [schedule for schedule in self.all_schedules_except_always if schedule.should_be_used]
@property
def disable_always(self) -> bool:
return any([schedule.disable_always for schedule in self.all_schedules_except_always])
return any([schedule.disable_always for schedule in self.all_valid_schedule_except_always])
@property
def all_schedules(self) -> List[ScheduleEntry]: