mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-16 23:09:14 -04:00
try again
This commit is contained in:
@@ -132,6 +132,8 @@ def send_messages(service_id, template_id):
|
||||
form = CsvUploadForm()
|
||||
if form.validate_on_submit():
|
||||
try:
|
||||
data = Spreadsheet.from_file_form(form).as_dict
|
||||
raise Exception(f"Data in send: {data}")
|
||||
upload_id = s3upload(
|
||||
service_id,
|
||||
Spreadsheet.from_file_form(form).as_dict,
|
||||
|
||||
@@ -44,8 +44,6 @@ class Spreadsheet:
|
||||
@staticmethod
|
||||
def normalise_newlines(file_content):
|
||||
rows = file_content.read().decode("utf-8").splitlines()
|
||||
if len(rows) == 0 or rows[0] is None or rows[0] == "":
|
||||
raise Exception("No header row")
|
||||
return "\r\n".join(rows)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user