Skip to content

Commit

Permalink
- Fix bug where always getting disabled by non-active schedules
Browse files Browse the repository at this point in the history
  • Loading branch information
nwithan8 committed Jan 22, 2024
1 parent bf2e61c commit 85ef123
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/schedule_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,13 @@ def valid_always_schedule_log_message(self) -> str:
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]:
Expand Down

0 comments on commit 85ef123

Please sign in to comment.