From 646b1ec179d66cb64b8e5d64fdd5999b4312e1f9 Mon Sep 17 00:00:00 2001 From: Steven Bal Date: Tue, 12 Mar 2024 15:37:34 +0100 Subject: [PATCH] :ok_hand: [#2193] PR feedback --- src/open_inwoner/pdc/admin/category.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/open_inwoner/pdc/admin/category.py b/src/open_inwoner/pdc/admin/category.py index 27327631bd..7927d0a937 100644 --- a/src/open_inwoner/pdc/admin/category.py +++ b/src/open_inwoner/pdc/admin/category.py @@ -35,14 +35,19 @@ def zaaktypen_select_schema() -> dict: choices = [] for zaaktype in zaaktypen: + title = zaaktype.omschrijving + # eSuite doesn't have the Catalogus resource + if zaaktype.catalogus: + title = f"{zaaktype.catalogus.domein} - {zaaktype.catalogus.rsin}: {title}" + choices.append( { "value": zaaktype.identificatie, - "title": f"{zaaktype.catalogus.domein} - {zaaktype.catalogus.rsin}: {zaaktype.omschrijving}", + "title": title, } ) - choices = sorted(choices, key=lambda item: item["title"]) + choices.sort(key=lambda item: item["title"]) schema = { "type": "array",