mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -03:30
Fix job template job sorting
"started" isn't a good field to sort on as it can be Null. "created" will always be available.
This commit is contained in:
parent
e69fdfa79b
commit
13c80375ea
@ -1505,7 +1505,7 @@ class JobTemplateSerializer(UnifiedJobTemplateSerializer, JobOptionsSerializer):
|
||||
else:
|
||||
d['can_copy'] = False
|
||||
d['can_edit'] = False
|
||||
d['recent_jobs'] = [{'id': x.id, 'status': x.status, 'finished': x.finished} for x in obj.jobs.filter(active=True).order_by('-started')[:10]]
|
||||
d['recent_jobs'] = [{'id': x.id, 'status': x.status, 'finished': x.finished} for x in obj.jobs.filter(active=True).order_by('-created')[:10]]
|
||||
return d
|
||||
|
||||
def validate_survey_enabled(self, attrs, source):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user