Fix error if no view supplements defined

This commit is contained in:
Lance Edgar 2022-12-10 12:41:10 -06:00
parent 5045df0b57
commit 3c54960612

View file

@ -3883,7 +3883,7 @@ class MasterView(View):
""" """
Iterate over all registered supplements for this master view. Iterate over all registered supplements for this master view.
""" """
supplements = self.request.registry.settings['tailbone_view_supplements'] supplements = self.request.registry.settings.get('tailbone_view_supplements', [])
route_prefix = self.get_route_prefix() route_prefix = self.get_route_prefix()
if supplements and route_prefix in supplements: if supplements and route_prefix in supplements:
for cls in supplements[route_prefix]: for cls in supplements[route_prefix]: