Show all pages of a sent letter

Because we weren’t specifying how many pages the letter has, it was
defaulting to only showing the first page. This looked broken.
This commit is contained in:
Chris Hill-Scott
2018-01-03 13:30:51 +00:00
parent ec265dd2b4
commit 22de67fa19
2 changed files with 26 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ from app import (
current_service
)
from app.main import main
from app.template_previews import TemplatePreview
from app.template_previews import TemplatePreview, get_page_count_for_letter
from app.utils import (
user_has_permissions,
get_help_argument,
@@ -40,6 +40,7 @@ def view_notification(service_id, notification_id):
notification_id=notification_id,
filetype='png',
),
page_count=get_page_count_for_letter(notification['template']),
show_recipient=True,
redact_missing_personalisation=True,
)