Don’t return jobs sent from contact lists

Now that we’re grouping jobs sent from contact lists within their
parent, they shouldn’t also be listed on the jobs page at the top level.
This commit is contained in:
Chris Hill-Scott
2020-05-12 14:15:27 +01:00
parent b8b99b607b
commit 061c0a0050
3 changed files with 16 additions and 1 deletions

View File

@@ -69,6 +69,7 @@ def dao_get_jobs_by_service_id(
Job.service_id == service_id,
Job.original_file_name != current_app.config['TEST_MESSAGE_FILENAME'],
Job.original_file_name != current_app.config['ONE_OFF_MESSAGE_FILENAME'],
Job.contact_list_id == contact_list_id,
]
if limit_days is not None:
query_filter.append(Job.created_at >= midnight_n_days_ago(limit_days))