Skip to content

Commit

Permalink
handle linkUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Sep 30, 2024
1 parent faa1e89 commit 55a8201
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/iosanita/policy/restapi/services/search_filters/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ def get_sections(self):
for setting in self.get_data_from_registry(field_id="search_sections"):
items = []
for section_settings in setting.get("items") or []:
for uid in section_settings.get("linkUrl") or []:
for link_item in section_settings.get("linkUrl") or []:
uid = ""
if isinstance(link_item, str):
uid = link_item
else:
uid = link_item.get("UID", "")
if not uid:
continue
try:
section = api.content.get(UID=uid)
except Unauthorized:
Expand Down

0 comments on commit 55a8201

Please sign in to comment.