Remove the template_postage parameter for persist_notification

It was confusing to have 2 differnt postage parameters.
This commit is contained in:
Rebecca Law
2020-08-04 15:41:42 +01:00
parent 10fe7d9fe8
commit 4a9f9e4b17
7 changed files with 11 additions and 20 deletions

View File

@@ -107,7 +107,6 @@ def persist_notification(
reply_to_text=None,
billable_units=None,
postage=None,
template_postage=None,
document_download_count=None,
updated_at=None
):
@@ -147,8 +146,8 @@ def persist_notification(
elif notification_type == EMAIL_TYPE:
notification.normalised_to = format_email_address(notification.to)
elif notification_type == LETTER_TYPE:
notification.postage = postage or template_postage
notification.international = True if postage in INTERNATIONAL_POSTAGE_TYPES else False
notification.postage = postage
notification.international = postage in INTERNATIONAL_POSTAGE_TYPES
notification.normalised_to = ''.join(notification.to.split()).lower()
# if simulated create a Notification model to return but do not persist the Notification to the dB