mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 10:28:41 -04:00
switch commas to tabs
This commit is contained in:
@@ -75,7 +75,7 @@ def platform_admin():
|
|||||||
def download_all_users():
|
def download_all_users():
|
||||||
|
|
||||||
# Create a CSV string from the user data
|
# Create a CSV string from the user data
|
||||||
csv_data = "Name,Email Address,Mobile Number,Service\n"
|
csv_data = "Name\tEmail Address\tMobile Number\tService\n"
|
||||||
users = user_api_client.get_all_users_detailed()
|
users = user_api_client.get_all_users_detailed()
|
||||||
|
|
||||||
if len(users) == 0:
|
if len(users) == 0:
|
||||||
@@ -84,7 +84,7 @@ def download_all_users():
|
|||||||
for user in users:
|
for user in users:
|
||||||
if user["name"].startswith("e2e"):
|
if user["name"].startswith("e2e"):
|
||||||
continue
|
continue
|
||||||
csv_data += f"{user['name']},{user['email_address']},{user['mobile_number']},{user['service']}\n"
|
csv_data += f"{user['name']}\t{user['email_address']}\t{user['mobile_number']}\t{user['service']}\n"
|
||||||
|
|
||||||
# Create a direct download response with the CSV data and appropriate headers
|
# Create a direct download response with the CSV data and appropriate headers
|
||||||
response = Response(csv_data, content_type="text/csv")
|
response = Response(csv_data, content_type="text/csv")
|
||||||
|
|||||||
Reference in New Issue
Block a user