mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-21 05:32:44 -04:00
Add extra flag to indicate we want a csv notification response
This commit is contained in:
@@ -150,7 +150,8 @@ def view_job_csv(service_id, job_id):
|
||||
job_id=job_id,
|
||||
status=filter_args.get('status'),
|
||||
page=request.args.get('page', 1),
|
||||
page_size=5000
|
||||
page_size=5000,
|
||||
format_for_csv=True
|
||||
)
|
||||
),
|
||||
mimetype='text/csv',
|
||||
|
||||
@@ -20,7 +20,8 @@ class NotificationApiClient(NotifyAdminAPIClient):
|
||||
page_size=None,
|
||||
limit_days=None,
|
||||
include_jobs=None,
|
||||
include_from_test_key=None
|
||||
include_from_test_key=None,
|
||||
format_for_csv=None
|
||||
):
|
||||
params = {}
|
||||
if page is not None:
|
||||
@@ -35,6 +36,8 @@ class NotificationApiClient(NotifyAdminAPIClient):
|
||||
params['include_jobs'] = include_jobs
|
||||
if include_from_test_key is not None:
|
||||
params['include_from_test_key'] = include_from_test_key
|
||||
if format_for_csv is not None:
|
||||
params['format_for_csv'] = format_for_csv
|
||||
if job_id:
|
||||
return self.get(
|
||||
url='/service/{}/job/{}/notifications'.format(service_id, job_id),
|
||||
|
||||
Reference in New Issue
Block a user