Skip to content

Commit

Permalink
Handle missing in registry entry
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Feb 7, 2024
1 parent 72aa179 commit 781a5a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog
6.1.13 (unreleased)
-------------------

- Nothing changed yet.
- Handle missing `show_dynamic_folders_in_footer` in registry entry.
[cekk]


6.1.12 (2024-02-06)
Expand Down
13 changes: 8 additions & 5 deletions src/design/plone/contenttypes/restapi/services/navigation/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
class Navigation(BaseNavigation):
def __call__(self, expand=False):
result = super().__call__(expand=expand)
show_dynamic_folders_in_footer = api.portal.get_registry_record(
"show_dynamic_folders_in_footer",
interface=IDesignPloneSettings,
default=False,
)
try:
show_dynamic_folders_in_footer = api.portal.get_registry_record(
"show_dynamic_folders_in_footer",
interface=IDesignPloneSettings,
default=True,
)
except KeyError:
show_dynamic_folders_in_footer = True
result["navigation"]["show_in_footer"] = show_dynamic_folders_in_footer
return result

Expand Down

0 comments on commit 781a5a4

Please sign in to comment.