--- a/src/pyams_portal/views.py Tue Oct 30 12:29:52 2018 +0100
+++ b/src/pyams_portal/views.py Sun Nov 11 16:25:55 2018 +0100
@@ -65,12 +65,13 @@
return IPortalPortletsConfiguration(self.context)
def get_portlet(self, name):
- return self.request.registry.getUtility(IPortlet, name=name)
+ return self.request.registry.queryUtility(IPortlet, name=name)
def get_portlet_css_class(self, portlet_id):
configuration = self.portlet_configuration.get_portlet_configuration(portlet_id)
portlet = self.get_portlet(configuration.portlet_name)
- return self.request.registry.queryMultiAdapter((portlet, self.request), IPortletCSSClass, default='')
+ if portlet is not None:
+ return self.request.registry.queryMultiAdapter((portlet, self.request), IPortletCSSClass, default='')
def render_portlet(self, portlet_id):
renderer = self.portlets.get(portlet_id)