mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
try again
This commit is contained in:
@@ -132,6 +132,8 @@ def send_messages(service_id, template_id):
|
|||||||
form = CsvUploadForm()
|
form = CsvUploadForm()
|
||||||
if form.validate_on_submit():
|
if form.validate_on_submit():
|
||||||
try:
|
try:
|
||||||
|
data = Spreadsheet.from_file_form(form).as_dict
|
||||||
|
raise Exception(f"Data in send: {data}")
|
||||||
upload_id = s3upload(
|
upload_id = s3upload(
|
||||||
service_id,
|
service_id,
|
||||||
Spreadsheet.from_file_form(form).as_dict,
|
Spreadsheet.from_file_form(form).as_dict,
|
||||||
|
|||||||
@@ -44,8 +44,6 @@ class Spreadsheet:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def normalise_newlines(file_content):
|
def normalise_newlines(file_content):
|
||||||
rows = file_content.read().decode("utf-8").splitlines()
|
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)
|
return "\r\n".join(rows)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user