diff --git a/CHANGES.rst b/CHANGES.rst index a7dfb64..e8e8356 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,8 @@ Changelog 4.0.12 (unreleased) ------------------- -- Nothing changed yet. +- Handle edge-case in @bandi-search-filters when a Bando does not have tipologia set. + [cekk] 4.0.11 (2024-09-05) diff --git a/src/design/plone/policy/restapi/bandi_search_filters/get.py b/src/design/plone/policy/restapi/bandi_search_filters/get.py index ebe735f..aa40405 100644 --- a/src/design/plone/policy/restapi/bandi_search_filters/get.py +++ b/src/design/plone/policy/restapi/bandi_search_filters/get.py @@ -32,6 +32,8 @@ def reply(self): for brain in brains: bando = brain.getObject() + if not bando.tipologia_bando: + continue found = [x for x in tipologie if x["UID"] == bando.tipologia_bando] if not found: tipologie.append(