mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 08:44:23 -04:00
Include placeholders in letter length check
When filling in the letter address having clicked 'back' (https://www.pivotaltracker.com/story/show/181513431).
This commit is contained in:
@@ -357,6 +357,8 @@ def send_one_off_letter_address(service_id, template_id):
|
|||||||
|
|
||||||
db_template = current_service.get_template_with_user_permission_or_403(template_id, current_user)
|
db_template = current_service.get_template_with_user_permission_or_403(template_id, current_user)
|
||||||
|
|
||||||
|
session_placeholders = get_normalised_placeholders_from_session()
|
||||||
|
|
||||||
template = get_template(
|
template = get_template(
|
||||||
db_template,
|
db_template,
|
||||||
current_service,
|
current_service,
|
||||||
@@ -367,14 +369,12 @@ def send_one_off_letter_address(service_id, template_id):
|
|||||||
template_id=template_id,
|
template_id=template_id,
|
||||||
filetype='png',
|
filetype='png',
|
||||||
),
|
),
|
||||||
page_count=get_page_count_for_letter(db_template),
|
page_count=get_page_count_for_letter(db_template, session_placeholders),
|
||||||
email_reply_to=None,
|
email_reply_to=None,
|
||||||
sms_sender=None
|
sms_sender=None
|
||||||
)
|
)
|
||||||
|
|
||||||
current_session_address = PostalAddress.from_personalisation(
|
current_session_address = PostalAddress.from_personalisation(session_placeholders)
|
||||||
get_normalised_placeholders_from_session()
|
|
||||||
)
|
|
||||||
|
|
||||||
form = LetterAddressForm(
|
form = LetterAddressForm(
|
||||||
address=current_session_address.normalised,
|
address=current_session_address.normalised,
|
||||||
|
|||||||
Reference in New Issue
Block a user