When looping through the schedule to remove hidden attributes, we should only do that if the item in question is a dictionary. It could be the attribute that determines if the entire scheudle is enabled or disable.

This commit is contained in:
Gareth J. Greenaway 2019-02-12 11:47:08 -08:00
parent fdb13a3a91
commit 1c6d4fbc74
No known key found for this signature in database
GPG key ID: 10B62F8A7CAD7A41

View file

@ -160,9 +160,10 @@ class Schedule(object):
if remove_hidden:
_schedule = copy.deepcopy(schedule)
for job in _schedule:
for item in _schedule[job]:
if item.startswith('_'):
del schedule[job][item]
if isinstance(_schedule[job], dict):
for item in _schedule[job]:
if item.startswith('_'):
del schedule[job][item]
return schedule
def _check_max_running(self, func, data, opts):