mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
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. The jobs page uses the uploads API, not the jobs API, so this commit makes sure that filtering is happening in the proper place.
This commit is contained in:
@@ -43,7 +43,8 @@ def dao_get_uploads_by_service_id(service_id, limit_days=None, page=1, page_size
|
||||
Job.job_status.notin_([JOB_STATUS_CANCELLED, JOB_STATUS_SCHEDULED]),
|
||||
func.coalesce(
|
||||
Job.processing_started, Job.created_at
|
||||
) >= today - func.coalesce(ServiceDataRetention.days_of_retention, 7)
|
||||
) >= today - func.coalesce(ServiceDataRetention.days_of_retention, 7),
|
||||
Job.contact_list_id.is_(None),
|
||||
]
|
||||
if limit_days is not None:
|
||||
jobs_query_filter.append(Job.created_at >= midnight_n_days_ago(limit_days))
|
||||
|
||||
Reference in New Issue
Block a user