# HG changeset patch # User Thierry Florac # Date 1570209194 -7200 # Node ID ecbd099f262765ddbd2f089c680ebb9cfb9be33a # Parent b7d59c0b94f5e3d4f0849eb9468e688eb3123c94 Always display selected renderer diff -r b7d59c0b94f5 -r ecbd099f2627 src/pyams_portal/portlet.py --- a/src/pyams_portal/portlet.py Thu Sep 26 11:56:07 2019 +0200 +++ b/src/pyams_portal/portlet.py Fri Oct 04 19:13:14 2019 +0200 @@ -174,12 +174,10 @@ return render('templates/portlet-hidden.pt', {}, request=self.request) else: result = super(PortletPreviewer, self).render() - settings = self.settings - if settings.renderer: - renderer = settings.get_renderer() - translate = self.request.localizer.translate - result = PREVIEW_PREFIX.format(label=translate(_("Renderer:")), - renderer=translate(renderer.label)) + result + renderer = self.settings.get_renderer() + translate = self.request.localizer.translate + result = PREVIEW_PREFIX.format(label=translate(_("Renderer:")), + renderer=translate(renderer.label)) + result return result