mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Recalculate dtstart and dtend on every save now that it is idempotwhatever
This commit is contained in:
parent
008ec8f86e
commit
2e6457b887
@ -91,10 +91,11 @@ class Schedule(CommonModel):
|
||||
next_run_actual = future_rs.after(now())
|
||||
|
||||
self.next_run = next_run_actual
|
||||
if self.dtstart is None:
|
||||
self.dtstart = future_rs[0]
|
||||
if self.dtend is None and "until" in self.rrule.lower() or 'count' in self.rrule.lower():
|
||||
self.dtstart = future_rs[0]
|
||||
if "until" in self.rrule.lower() or 'count' in self.rrule.lower():
|
||||
self.dtend = future_rs[-1]
|
||||
else:
|
||||
self.dtend = None
|
||||
self.unified_job_template.update_computed_fields()
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user