mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 17:38:50 -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)
|
||||
|
||||
session_placeholders = get_normalised_placeholders_from_session()
|
||||
|
||||
template = get_template(
|
||||
db_template,
|
||||
current_service,
|
||||
@@ -367,14 +369,12 @@ def send_one_off_letter_address(service_id, template_id):
|
||||
template_id=template_id,
|
||||
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,
|
||||
sms_sender=None
|
||||
)
|
||||
|
||||
current_session_address = PostalAddress.from_personalisation(
|
||||
get_normalised_placeholders_from_session()
|
||||
)
|
||||
current_session_address = PostalAddress.from_personalisation(session_placeholders)
|
||||
|
||||
form = LetterAddressForm(
|
||||
address=current_session_address.normalised,
|
||||
|
||||
Reference in New Issue
Block a user