From d08968a34815bb6ae5f8bbea4dbad02a93caae01 Mon Sep 17 00:00:00 2001
From: Beverly Nguyen
Date: Fri, 23 Feb 2024 15:02:18 -0800
Subject: [PATCH] update test
---
app/main/views/send.py | 28 ++++++++-----------
.../views/notifications/notification.html | 12 ++++----
2 files changed, 18 insertions(+), 22 deletions(-)
diff --git a/app/main/views/send.py b/app/main/views/send.py
index 10f74bb41..d45c1909f 100644
--- a/app/main/views/send.py
+++ b/app/main/views/send.py
@@ -52,14 +52,12 @@ def get_example_csv_fields(column_headers, use_example_as_example, submitted_fie
def get_example_csv_rows(template, use_example_as_example=True, submitted_fields=False):
return {
- "email": (
- ["test@example.com"]
- if use_example_as_example
- else [current_user.email_address]
- ),
- "sms": (
- ["12223334444"] if use_example_as_example else [current_user.mobile_number]
- ),
+ "email": ["test@example.com"]
+ if use_example_as_example
+ else [current_user.email_address],
+ "sms": ["12223334444"]
+ if use_example_as_example
+ else [current_user.mobile_number],
}[template.template_type] + get_example_csv_fields(
(
placeholder
@@ -513,14 +511,12 @@ def _check_messages(service_id, template_id, upload_id, preview_row):
template=template,
max_initial_rows_shown=50,
max_errors_shown=50,
- guestlist=(
- itertools.chain.from_iterable(
- [user.name, user.mobile_number, user.email_address]
- for user in Users(service_id)
- )
- if current_service.trial_mode
- else None
- ),
+ guestlist=itertools.chain.from_iterable(
+ [user.name, user.mobile_number, user.email_address]
+ for user in Users(service_id)
+ )
+ if current_service.trial_mode
+ else None,
remaining_messages=remaining_messages,
allow_international_sms=current_service.has_permission("international_sms"),
)
diff --git a/app/templates/views/notifications/notification.html b/app/templates/views/notifications/notification.html
index e5a41d422..cf61250ed 100644
--- a/app/templates/views/notifications/notification.html
+++ b/app/templates/views/notifications/notification.html
@@ -20,13 +20,13 @@
{{ page_header(
1|message_count_label(template.template_type, suffix='') | capitalize
) }}
-
- {% if help %}
- ‘{{ template.name }}’
+
+ {% if help %}
+ ‘{{ template.name }}’
{% else %}
‘{{ template.name }}’
- {% endif %}
- was sent
+ {% endif %}
+ was sent
{% if job and job.original_file_name != 'Report' %}
{% set destination =
{'email': 'an email address', 'sms': 'a phone number'} %}
@@ -36,7 +36,7 @@
by {{ created_by.name }}
{% endif %}
{{ created_at|format_datetime_human }}
-
+
{{ template|string }}