mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Tell template preview to allow international letters
If a service has permission to send international letters then it should tell template preview, so that template preview knows what rule to apply when it’s validating the address of the letter. Depends on: - [ ] https://github.com/alphagov/notifications-template-preview/pull/445
This commit is contained in:
@@ -40,6 +40,7 @@ from app.letters.utils import (
|
||||
get_file_names_from_error_bucket,
|
||||
)
|
||||
from app.models import (
|
||||
INTERNATIONAL_LETTERS,
|
||||
KEY_TYPE_TEST,
|
||||
NOTIFICATION_CREATED,
|
||||
NOTIFICATION_DELIVERED,
|
||||
@@ -227,6 +228,9 @@ def sanitise_letter(self, filename):
|
||||
kwargs={
|
||||
'notification_id': str(notification.id),
|
||||
'filename': filename,
|
||||
'allow_international_letters': notification.service.has_permission(
|
||||
INTERNATIONAL_LETTERS
|
||||
),
|
||||
},
|
||||
queue=QueueNames.SANITISE_LETTERS,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user