Fix empty jobs table showing on dashbord

If you have scheduled and then cancelled jobs this would be enough to
show the jobs block on the dashboard (in otherwords it wasn’t filtering
out cancelled jobs). However the contents of the table _were_ filtering
out cancelled jobs, so the table would be empty and look broken.

This commit changes the conditional to operate on the `list` of jobs
with cancelled ones filtered out.
This commit is contained in:
Chris Hill-Scott
2016-09-07 11:13:07 +01:00
parent 93ca29eab8
commit 9fa99fe007

View File

@@ -146,7 +146,7 @@ def get_dashboard_partials(service_id):
'views/dashboard/_jobs.html',
jobs=immediate_jobs
),
'has_jobs': bool(jobs),
'has_jobs': bool(immediate_jobs),
'usage': render_template(
'views/dashboard/_usage.html',
**calculate_usage(service_api_client.get_service_usage(service_id)['data'])