Check page count of actual notification not of template

But for jobs we are only checking preview row, otherwise it would
be too slow. We will check other row when creating the pdf
This commit is contained in:
Pea Tyczynska
2019-10-08 14:56:00 +01:00
parent 12ec2870af
commit 6639209229
3 changed files with 18 additions and 5 deletions

View File

@@ -26,7 +26,12 @@ from app.s3_client.s3_letter_upload_client import (
upload_letter_to_s3,
)
from app.template_previews import TemplatePreview, sanitise_letter
from app.utils import get_template, is_letter_too_long, user_has_permissions
from app.utils import (
LETTER_MAX_PAGES,
get_template,
is_letter_too_long,
user_has_permissions,
)
MAX_FILE_UPLOAD_SIZE = 2 * 1024 * 1024 # 2MB
@@ -132,6 +137,7 @@ def uploaded_letter_preview(service_id, file_id):
status=status,
file_id=file_id,
letter_too_long=letter_too_long,
letter_max_pages=LETTER_MAX_PAGES,
)