mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
remove an RRULE parsing bug fix that landed upstream in python-dateutil
related: a2a246a834
This commit is contained in:
parent
a2a246a834
commit
21d629531f
@ -97,7 +97,7 @@ class Schedule(CommonModel, LaunchTimeConfig):
|
||||
@classmethod
|
||||
def rrulestr(cls, rrule, **kwargs):
|
||||
"""
|
||||
Apply our own custom rrule parsing logic to support TZID=
|
||||
Apply our own custom rrule parsing requirements
|
||||
"""
|
||||
kwargs['forceset'] = True
|
||||
x = dateutil.rrule.rrulestr(rrule, **kwargs)
|
||||
@ -108,15 +108,6 @@ class Schedule(CommonModel, LaunchTimeConfig):
|
||||
'A valid TZID must be provided (e.g., America/New_York)'
|
||||
)
|
||||
|
||||
if r._dtstart and r._until:
|
||||
# If https://github.com/dateutil/dateutil/pull/634 ever makes
|
||||
# it into a python-dateutil release, we could remove this block.
|
||||
if all((
|
||||
r._dtstart.tzinfo != dateutil.tz.tzlocal(),
|
||||
r._until.tzinfo != dateutil.tz.tzutc(),
|
||||
)):
|
||||
raise ValueError('RRULE UNTIL values must be specified in UTC')
|
||||
|
||||
if 'MINUTELY' in rrule or 'HOURLY' in rrule:
|
||||
try:
|
||||
first_event = x[0]
|
||||
|
Loading…
Reference in New Issue
Block a user