mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
Filter out inactive jobs when pulling for latest status on the job
template list
This commit is contained in:
parent
4129282401
commit
e790ba480e
@ -1361,7 +1361,7 @@ class JobTemplateSerializer(UnifiedJobTemplateSerializer, JobOptionsSerializer):
|
||||
else:
|
||||
d['can_copy'] = False
|
||||
d['can_edit'] = False
|
||||
d['recent_jobs'] = [{'id': x.id, 'status': x.status} for x in obj.jobs.all().order_by('-started')[:10]]
|
||||
d['recent_jobs'] = [{'id': x.id, 'status': x.status} for x in obj.jobs.filter(active=True).order_by('-started')[:10]]
|
||||
return d
|
||||
|
||||
class JobSerializer(UnifiedJobSerializer, JobOptionsSerializer):
|
||||
|
Loading…
Reference in New Issue
Block a user