Files
notifications-api/app/csv.py
Martyn Inglis 10a764a2c1 Renamed the header of the CSV to 'to' from 'number' to allow for email jobs
- added new columns to Job and Notification to capture the start/end dates accurately
2016-02-25 09:59:50 +00:00

13 lines
298 B
Python

import csv
def get_recipient_from_csv(file_data):
numbers = []
reader = csv.DictReader(
file_data.splitlines(),
lineterminator='\n',
quoting=csv.QUOTE_NONE)
for i, row in enumerate(reader):
numbers.append(row['to'].replace(' ', ''))
return numbers