mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-04 16:11:11 -04:00
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:
@@ -98,9 +98,10 @@ def generate_notifications_csv(json_list):
|
||||
retval = None
|
||||
with content as csvfile:
|
||||
csvwriter = csv.writer(csvfile)
|
||||
csvwriter.writerow(['Recipient', 'Template', 'Type', 'Job', 'Status', 'Time'])
|
||||
csvwriter.writerow(['Row number', 'Recipient', 'Template', 'Type', 'Job', 'Status', 'Time'])
|
||||
for x in json_list:
|
||||
csvwriter.writerow([
|
||||
int(x['job_row_number']) + 2 if 'job_row_number' in x and x['job_row_number'] else '',
|
||||
x['to'],
|
||||
x['template']['name'],
|
||||
x['template']['template_type'],
|
||||
|
||||
Reference in New Issue
Block a user