mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 16:38:59 -04:00
Give Flask bytes to send, not string
For some reason this passed the tests, but didn’t work running locally.
This commit is contained in:
@@ -3,7 +3,7 @@ import itertools
|
||||
import json
|
||||
import urllib
|
||||
import uuid
|
||||
from io import BytesIO, StringIO
|
||||
from io import BytesIO
|
||||
from zipfile import BadZipFile
|
||||
|
||||
from flask import (
|
||||
@@ -449,7 +449,7 @@ def contact_list(service_id, contact_list_id):
|
||||
def download_contact_list(service_id, contact_list_id):
|
||||
contact_list = ContactList.from_id(contact_list_id, service_id=service_id)
|
||||
return send_file(
|
||||
filename_or_fp=StringIO(contact_list.contents),
|
||||
filename_or_fp=BytesIO(contact_list.contents.encode('utf-8')),
|
||||
attachment_filename=contact_list.saved_file_name,
|
||||
as_attachment=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user