mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-13 17:59:45 -04:00
Adding the personalization message back in
This commit is contained in:
@@ -707,6 +707,12 @@ def _get_content_count_error_and_message_for_template(template):
|
||||
f"too many"
|
||||
)
|
||||
|
||||
if template.placeholders:
|
||||
return False, Markup(
|
||||
f"Will be charged as {message_count(template.fragment_count, template.template_type)} "
|
||||
f"(not including personalization). {warning}"
|
||||
)
|
||||
|
||||
# If there's a warning, return it alone and hide the "Will be charged as..." text
|
||||
if warning:
|
||||
return False, Markup(warning)
|
||||
|
||||
@@ -2060,7 +2060,7 @@ def test_set_template_sender(
|
||||
"sms",
|
||||
False,
|
||||
"Hello ((name))",
|
||||
"Will be charged as 1 text message.",
|
||||
"Will be charged as 1 text message (not including personalization).",
|
||||
None,
|
||||
),
|
||||
(
|
||||
@@ -2068,7 +2068,7 @@ def test_set_template_sender(
|
||||
"sms",
|
||||
False,
|
||||
f'Hello (( {"a" * 999} ))',
|
||||
"Will be charged as 1 text message.",
|
||||
"Will be charged as 1 text message (not including personalization).",
|
||||
None,
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user