Merge pull request #2968 from alphagov/cancel-international-letters

Allow international letters to be cancelled
This commit is contained in:
Chris Hill-Scott
2020-09-09 14:10:23 +01:00
committed by GitHub
2 changed files with 16 additions and 1 deletions

View File

@@ -140,7 +140,11 @@ def update_notification_status_by_id(notification_id, status, sent_by=None, deta
_duplicate_update_warning(notification, status)
return None
if notification.international and not country_records_delivery(notification.phone_prefix):
if (
notification.notification_type == SMS_TYPE
and notification.international
and not country_records_delivery(notification.phone_prefix)
):
return None
if not notification.sent_by and sent_by:
notification.sent_by = sent_by