workflows: don't mark status as having a timeout if it's not valid (#54858)

This commit is contained in:
Frédéric Péters 2021-06-14 21:14:32 +02:00
parent 2089a212f0
commit 39d7b83bd6
1 changed files with 2 additions and 2 deletions

View File

@ -301,11 +301,11 @@ def workflows_with_timeout():
if hasattr(item, 'status') and hasattr(item, 'timeout') and (item.status and item.timeout):
if workflow_id not in wfs_status:
wfs_status[workflow_id] = {}
if status_str_id not in wfs_status[workflow_id]:
wfs_status[workflow_id][status_str_id] = []
if not item.get_target_status():
# this will catch status being a removed status
continue
if status_str_id not in wfs_status[workflow_id]:
wfs_status[workflow_id][status_str_id] = []
wfs_status[workflow_id][status_str_id].append(item)
return wfs_status