17501 fix showing last run of script job execution in list view

This commit is contained in:
Arthur Hanson 2024-09-23 11:53:24 -07:00
parent b305458b25
commit c6654d96a2

View File

@ -408,7 +408,7 @@ class JobsMixin(models.Model):
def get_latest_jobs(self):
"""
Return a dictionary mapping of the most recent jobs for this instance.
Return a list of the most recent jobs for this instance.
"""
return self.jobs.filter(status__in=JobStatusChoices.TERMINAL_STATE_CHOICES).order_by('-created').defer('data')