Verified Commit 8416d22c authored by David Haynes's avatar David Haynes 🙆
Browse files

Add additional condition to check that the promoted schedule is in effect

- only promote if it is active
parent e4c212d4
......@@ -179,7 +179,8 @@ class Facility(TimeStampedModel):
if special_schedule.valid_end < and special_schedule.schedule_for_removal:
elif special_schedule.promote_to_main:
self.main_schedule = special_schedule
if special_schedule.valid_start < and special_schedule.valid_end >=
self.main_schedule = special_schedule
class Meta:
verbose_name = "facility"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment