mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
Prevent cells containing commas breaking downloads
If a cell in the original file contains a comma, it comes back as two cells in the downloaded file. The CSV writer has logic to deal with this. It seems to work a lot better that just concatenating the columns with commas ourselves.
This commit is contained in:
@@ -175,7 +175,7 @@ def generate_notifications_csv(**kwargs):
|
||||
notification['created_at'],
|
||||
notification['updated_at']
|
||||
]
|
||||
yield ','.join(map(str, values)) + '\n'
|
||||
yield Spreadsheet.from_rows([map(str, values)]).as_csv_data
|
||||
|
||||
if notifications_resp['links'].get('next'):
|
||||
kwargs['page'] += 1
|
||||
|
||||
Reference in New Issue
Block a user