From 9bb81d93e97c105c0ff86bfd8ddd813f028fb755 Mon Sep 17 00:00:00 2001 From: Sampo Tawast Date: Wed, 2 Oct 2024 17:22:15 +0300 Subject: [PATCH] fix: conflict with _ as it was already defined --- backend/benefit/applications/api/v1/ahjo_decision_views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/benefit/applications/api/v1/ahjo_decision_views.py b/backend/benefit/applications/api/v1/ahjo_decision_views.py index 9205e4ed1f..5c93841f96 100644 --- a/backend/benefit/applications/api/v1/ahjo_decision_views.py +++ b/backend/benefit/applications/api/v1/ahjo_decision_views.py @@ -158,7 +158,10 @@ def patch(self, request): app_id = request.data["application_id"] application = get_object_or_404(Application, id=app_id) - proposal_object, _ = AhjoDecisionProposalDraft.objects.get_or_create( + ( + proposal_object, + is_created, + ) = AhjoDecisionProposalDraft.objects.get_or_create( # noqa application=application )