mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-22 08:21:13 -05:00
Set postage for templated letters when the address is not from the united-kingdom.
If the address is from the united-kingdom use the postage from the template.
This commit is contained in:
@@ -14,6 +14,7 @@ def create_letter_notification(
|
||||
reply_to_text=None,
|
||||
billable_units=None,
|
||||
updated_at=None,
|
||||
postage=None
|
||||
):
|
||||
notification = persist_notification(
|
||||
template_id=template.id,
|
||||
@@ -33,7 +34,9 @@ def create_letter_notification(
|
||||
status=status,
|
||||
reply_to_text=reply_to_text,
|
||||
billable_units=billable_units,
|
||||
postage=letter_data.get('postage'),
|
||||
# letter_data.get('postage') is only set for precompiled letters
|
||||
# letters from a template will pass in 'europe' or 'rest-of-world' if None then use postage from template
|
||||
postage=postage or letter_data.get('postage'),
|
||||
updated_at=updated_at
|
||||
)
|
||||
return notification
|
||||
|
||||
Reference in New Issue
Block a user