Job notification download now includes all notifications.

Get row number to match excel format.

Fix for no job_row_number.
This commit is contained in:
Nicholas Staples
2016-05-31 10:21:40 +01:00
parent 01884655c7
commit 5ef5920c17
2 changed files with 7 additions and 2 deletions

View File

@@ -79,7 +79,11 @@ def view_job(service_id, job_id):
finished = job['status'] == 'finished'
if 'download' in request.args and request.args['download'] == 'csv':
csv_content = generate_notifications_csv(
notification_api_client.get_notifications_for_service(service_id, job_id)['notifications'])
notification_api_client.get_notifications_for_service(
service_id,
job_id,
page_size=job['notification_count']
)['notifications'])
return csv_content, 200, {
'Content-Type': 'text/csv; charset=utf-8',
'Content-Disposition': 'inline; filename="{} - {}.csv"'.format(