mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 18:58:25 -04:00
Reverse chronologically sort scheduled jobs
Now that scheduled jobs are mixed in with regular jobs it looks weird for the sort order to be different. This makes the sort order consistently go from furthest in the future to furthest in the past. The old sort order made sense when scheduled jobs were displayed separately on the dashboard.
This commit is contained in:
@@ -70,7 +70,8 @@ class JobApiClient(NotifyAdminAPIClient):
|
||||
service_id,
|
||||
statuses=[self.SCHEDULED_JOB_STATUS]
|
||||
)['data'],
|
||||
key=lambda job: job['scheduled_for']
|
||||
key=lambda job: job['scheduled_for'],
|
||||
reverse=True,
|
||||
)
|
||||
|
||||
@cache.set('has_jobs-{service_id}')
|
||||
|
||||
Reference in New Issue
Block a user