From 9fa99fe00733203ebba68ae1d1c9f8199ae0edd6 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 7 Sep 2016 11:13:07 +0100 Subject: [PATCH] Fix empty jobs table showing on dashbord MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- app/main/views/dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main/views/dashboard.py b/app/main/views/dashboard.py index fcc45c72c..b2787e8a4 100644 --- a/app/main/views/dashboard.py +++ b/app/main/views/dashboard.py @@ -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'])