Show address line 7 not postcode in example spreadsheet

Since the letter preview will now show address line 7, the example
spreadsheet we give should match.
This commit is contained in:
Chris Hill-Scott
2020-09-07 11:49:43 +01:00
parent 5194eba076
commit 0459e26be9
4 changed files with 13 additions and 13 deletions

View File

@@ -20,7 +20,7 @@ from notifications_utils.columns import Columns
from notifications_utils.pdf import is_letter_too_long
from notifications_utils.postal_address import (
PostalAddress,
address_lines_1_to_6_and_postcode_keys,
address_lines_1_to_7_keys,
)
from notifications_utils.recipients import RecipientCSV, first_column_headings
from notifications_utils.sanitise_text import SanitiseASCII
@@ -63,7 +63,7 @@ from app.utils import (
letter_address_columns = [
column.replace('_', ' ')
for column in address_lines_1_to_6_and_postcode_keys
for column in address_lines_1_to_7_keys
]
@@ -102,7 +102,7 @@ def get_example_letter_address(key):
return {
'address line 1': 'A. Name',
'address line 2': '123 Example Street',
'postcode': 'XM4 5HQ'
'address line 3': 'XM4 5HQ'
}.get(key, '')
@@ -381,7 +381,7 @@ def send_one_off_letter_address(service_id, template_id):
if all_placeholders_in_session(placeholders):
return get_notification_check_endpoint(service_id, template)
first_non_address_placeholder_index = len(address_lines_1_to_6_and_postcode_keys)
first_non_address_placeholder_index = len(address_lines_1_to_7_keys)
return redirect(url_for(
'main.send_one_off_step',
@@ -475,7 +475,7 @@ def send_test_step(service_id, template_id, step_index):
# if we're in a letter, we should show address block rather than "address line #" or "postcode"
if template.template_type == 'letter':
if step_index < len(address_lines_1_to_6_and_postcode_keys):
if step_index < len(address_lines_1_to_7_keys):
return redirect(url_for(
'.send_one_off_letter_address',
service_id=service_id,