revert change of including slice wfj ids in recent_jobs list

This commit is contained in:
AlanCoding
2018-10-17 15:26:34 -04:00
parent 37f9024940
commit affacb8ab5
3 changed files with 10 additions and 12 deletions

View File

@@ -2976,9 +2976,12 @@ class JobTemplateMixin(object):
'''
def _recent_jobs(self, obj):
job_mgr = obj.unifiedjob_unified_jobs.non_polymorphic().only('id', 'status', 'finished')
if hasattr(obj, 'workflow_jobs'):
job_mgr = obj.workflow_jobs
else:
job_mgr = obj.jobs
return [{'id': x.id, 'status': x.status, 'finished': x.finished}
for x in job_mgr.order_by('-created')[:10]]
for x in job_mgr.all().order_by('-created')[:10]]
def get_summary_fields(self, obj):
d = super(JobTemplateMixin, self).get_summary_fields(obj)