mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 02:03:11 -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"
|
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 there's a warning, return it alone and hide the "Will be charged as..." text
|
||||||
if warning:
|
if warning:
|
||||||
return False, Markup(warning)
|
return False, Markup(warning)
|
||||||
|
|||||||
@@ -2060,7 +2060,7 @@ def test_set_template_sender(
|
|||||||
"sms",
|
"sms",
|
||||||
False,
|
False,
|
||||||
"Hello ((name))",
|
"Hello ((name))",
|
||||||
"Will be charged as 1 text message.",
|
"Will be charged as 1 text message (not including personalization).",
|
||||||
None,
|
None,
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@@ -2068,7 +2068,7 @@ def test_set_template_sender(
|
|||||||
"sms",
|
"sms",
|
||||||
False,
|
False,
|
||||||
f'Hello (( {"a" * 999} ))',
|
f'Hello (( {"a" * 999} ))',
|
||||||
"Will be charged as 1 text message.",
|
"Will be charged as 1 text message (not including personalization).",
|
||||||
None,
|
None,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user