mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
Remove the template_postage parameter for persist_notification
It was confusing to have 2 differnt postage parameters.
This commit is contained in:
@@ -80,6 +80,8 @@ def send_one_off_notification(service_id, post_data):
|
||||
# Validate address and set postage to europe|rest-of-world if international letter,
|
||||
# otherwise persist_notification with use template postage
|
||||
postage = validate_address(service, personalisation)
|
||||
if not postage:
|
||||
postage = template.postage
|
||||
validate_created_by(service, post_data['created_by'])
|
||||
|
||||
sender_id = post_data.get('sender_id', None)
|
||||
@@ -92,7 +94,6 @@ def send_one_off_notification(service_id, post_data):
|
||||
notification = persist_notification(
|
||||
template_id=template.id,
|
||||
template_version=template.version,
|
||||
template_postage=template.postage,
|
||||
recipient=post_data['to'],
|
||||
service=service,
|
||||
personalisation=personalisation,
|
||||
@@ -178,7 +179,6 @@ def send_pdf_letter_notification(service_id, post_data):
|
||||
notification_id=post_data['file_id'],
|
||||
template_id=template.id,
|
||||
template_version=template.version,
|
||||
template_postage=template.postage,
|
||||
recipient=urllib.parse.unquote(post_data['recipient_address']),
|
||||
service=service,
|
||||
personalisation=personalisation,
|
||||
@@ -189,7 +189,7 @@ def send_pdf_letter_notification(service_id, post_data):
|
||||
client_reference=post_data['filename'],
|
||||
created_by_id=post_data['created_by'],
|
||||
billable_units=billable_units,
|
||||
postage=post_data['postage'],
|
||||
postage=post_data['postage'] or template.postage,
|
||||
)
|
||||
|
||||
upload_filename = get_letter_pdf_filename(
|
||||
|
||||
Reference in New Issue
Block a user