Revert notification_id name change in delivery_status service_callback_task data

This commit is contained in:
Pea Tyczynska
2018-07-20 11:22:38 +01:00
parent 812f4d20dd
commit 3048c05850
2 changed files with 3 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ def send_delivery_status_to_service(
status_update = encryption.decrypt(encrypted_status_update) status_update = encryption.decrypt(encrypted_status_update)
data = { data = {
"notification_id": str(notification_id), "id": str(notification_id),
"reference": status_update['notification_client_reference'], "reference": status_update['notification_client_reference'],
"to": status_update['notification_to'], "to": status_update['notification_to'],
"status": status_update['notification_status'], "status": status_update['notification_status'],
@@ -64,7 +64,7 @@ def send_complaint_to_service(self, complaint_data):
def _send_data_to_service_callback_api(self, data, service_callback_url, token, function_name): def _send_data_to_service_callback_api(self, data, service_callback_url, token, function_name):
notification_id = data["notification_id"] notification_id = (data["notification_id"] if "notification_id" in data else data["id"])
try: try:
response = request( response = request(
method="POST", method="POST",

View File

@@ -38,7 +38,7 @@ def test_send_delivery_status_to_service_post_https_request_to_service_with_encr
send_delivery_status_to_service(notification.id, encrypted_status_update=encrypted_status_update) send_delivery_status_to_service(notification.id, encrypted_status_update=encrypted_status_update)
mock_data = { mock_data = {
"notification_id": str(notification.id), "id": str(notification.id),
"reference": notification.client_reference, "reference": notification.client_reference,
"to": notification.to, "to": notification.to,
"status": notification.status, "status": notification.status,