From 0202f73f9a68a7ece64a6255a58d2e5546824f9c Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 20 Jan 2020 16:47:09 +0000 Subject: [PATCH] Remove job_status from allowed properties MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We can’t guarantee it’s always present, so shouldn’t allow direct access to it. --- app/models/job.py | 1 - app/templates/partials/jobs/notifications.html | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/job.py b/app/models/job.py index 46498993f..384edfd4d 100644 --- a/app/models/job.py +++ b/app/models/job.py @@ -24,7 +24,6 @@ class Job(JSONModel): 'original_file_name', 'created_at', 'notification_count', - 'job_status', 'created_by', } diff --git a/app/templates/partials/jobs/notifications.html b/app/templates/partials/jobs/notifications.html index 16b6c449a..fa7ea707b 100644 --- a/app/templates/partials/jobs/notifications.html +++ b/app/templates/partials/jobs/notifications.html @@ -47,7 +47,7 @@ notifications, caption=uploaded_file_name, caption_visible=False, - empty_message='These messages have been deleted because they were sent more than {} days ago'.format(service_data_retention_days) if job.job_status == 'finished' else 'No messages to show yet…', + empty_message='These messages have been deleted because they were sent more than {} days ago'.format(service_data_retention_days) if job.status == 'finished' else 'No messages to show yet…', field_headings=[ 'Recipient', 'Status'