Skip to content

Commit

Permalink
Do not return section children in @search-filters endpoint if they ar…
Browse files Browse the repository at this point in the history
…e types omitted from search results
  • Loading branch information
cekk committed Nov 21, 2023
1 parent 040fa7b commit 090a1c8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/design/plone/policy/restapi/search_filters/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,8 @@ def get_portal_types(self):
return sorted(types, key=lambda k: k["label"])

def reply(self):
settings = (
api.portal.get_registry_record(
"search_sections",
interface=IDesignPloneSettings,
)
or "[]"
settings = api.portal.get_registry_record(
"search_sections", interface=IDesignPloneSettings, default="[]"
)
utils = getToolByName(self.context, "plone_utils")

Expand Down

0 comments on commit 090a1c8

Please sign in to comment.