From 4b40bac9c216603316490c03df1ff0d9b79e3ba2 Mon Sep 17 00:00:00 2001 From: rikuke <33894149+rikuke@users.noreply.github.com> Date: Fri, 16 Feb 2024 12:07:54 +0200 Subject: [PATCH] Ahjo decision debug and fix (#2840) * fix: prepare_headers parameters * feat: log more info of downloaded attachments --- backend/benefit/applications/api/v1/ahjo_integration_views.py | 3 ++- backend/benefit/applications/services/ahjo_integration.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/benefit/applications/api/v1/ahjo_integration_views.py b/backend/benefit/applications/api/v1/ahjo_integration_views.py index 43396a7458..ccc86d383a 100644 --- a/backend/benefit/applications/api/v1/ahjo_integration_views.py +++ b/backend/benefit/applications/api/v1/ahjo_integration_views.py @@ -55,7 +55,8 @@ def get(self, request, *args, **kwargs): "", # Optional user backend Operation.READ, attachment, - additional_information="attachment was sent to AHJO!", + additional_information=f"attachment {attachment.attachment_file} \ +of type {attachment.attachment_type} was sent to AHJO!", ) return self._prepare_file_response(attachment) diff --git a/backend/benefit/applications/services/ahjo_integration.py b/backend/benefit/applications/services/ahjo_integration.py index 9ef27a3ae5..0ef6400cb6 100644 --- a/backend/benefit/applications/services/ahjo_integration.py +++ b/backend/benefit/applications/services/ahjo_integration.py @@ -657,7 +657,7 @@ def send_decision_proposal_to_ahjo(application_id: uuid.UUID): ahjo_token = get_token() headers = prepare_headers( ahjo_token.access_token, - application.id, + application, AhjoRequestType.SEND_DECISION_PROPOSAL, ) delete_existing_xml_attachments(application)