From e3b35b5b8389ef25d41e9d2bf95d6930b53d438a Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Wed, 12 Mar 2025 10:08:48 -0700 Subject: [PATCH] quick update to imports and variables used --- app/main/views/dashboard.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/app/main/views/dashboard.py b/app/main/views/dashboard.py index 6c7a20d01..7790d101f 100644 --- a/app/main/views/dashboard.py +++ b/app/main/views/dashboard.py @@ -17,7 +17,7 @@ from app import ( from app.main import main from app.main.views.user_profile import set_timezone from app.statistics_utils import get_formatted_percentage -from app.utils import FAILURE_STATUSES, REQUESTED_STATUSES +from app.utils import DELIVERED_STATUSES, FAILURE_STATUSES, REQUESTED_STATUSES from app.utils.time import get_current_financial_year from app.utils.user import user_has_permissions @@ -70,16 +70,7 @@ def service_dashboard(service_id): def job_is_finished(job_dict): - done_statuses = [ - "delivered", - "sent", - "failed", - "technical-failure", - "temporary-failure", - "permanent-failure", - "cancelled", - ] - + done_statuses = DELIVERED_STATUSES + FAILURE_STATUSES + ["cancelled"] processed_count = sum( stat["count"] for stat in job_dict["statistics"]