From bb0c630a767819de55c1cc47c8a332c55108d2c7 Mon Sep 17 00:00:00 2001 From: SilviaAmAm Date: Mon, 25 Nov 2024 14:26:13 +0100 Subject: [PATCH] :sparkles: [#499] Log event when author marks list ready to review --- backend/src/openarchiefbeheer/destruction/api/viewsets.py | 2 ++ backend/src/openarchiefbeheer/zaken/utils.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/openarchiefbeheer/destruction/api/viewsets.py b/backend/src/openarchiefbeheer/destruction/api/viewsets.py index b00e297e..e4c1f156 100644 --- a/backend/src/openarchiefbeheer/destruction/api/viewsets.py +++ b/backend/src/openarchiefbeheer/destruction/api/viewsets.py @@ -371,6 +371,8 @@ def mark_ready_review(self, request, *args, **kwargs): destruction_list.assign_next() + logevent.destruction_list_ready_for_first_review(destruction_list, request.user) + return Response(status=status.HTTP_201_CREATED) @action(detail=True, methods=["post"], name="abort-destruction") diff --git a/backend/src/openarchiefbeheer/zaken/utils.py b/backend/src/openarchiefbeheer/zaken/utils.py index 632f6f8c..8d6db4f4 100644 --- a/backend/src/openarchiefbeheer/zaken/utils.py +++ b/backend/src/openarchiefbeheer/zaken/utils.py @@ -129,8 +129,9 @@ def format_selectielijstklasse_choice(resultaat: Resultaat) -> DropDownChoice: def format_resultaten_choices(resultaten: list[dict]) -> DropDownChoice: result = [ { - "value": resultaat["url"], - "label": resultaat.get("toelichting", resultaat["uuid"]), + "value": resultaat["_expand"]["resultaattype"]["url"], + "label": resultaat["_expand"]["resultaattype"]["omschrijving"], + "extra_data": {"toelichting": resultaat.get("toelichting")}, } for resultaat in resultaten ]