--- a/src/pyams_content/component/paragraph/zmi/preview.py Fri Mar 02 15:02:15 2018 +0100
+++ b/src/pyams_content/component/paragraph/zmi/preview.py Fri Mar 02 15:02:52 2018 +0100
@@ -56,8 +56,8 @@
return request
def render_paragraph(self, paragraph, language=None):
- renderer = self.request.registry.queryMultiAdapter((paragraph, self.render_request), IParagraphPreview)
- if renderer is not None:
- renderer.language = language
- renderer.update()
- return renderer.render()
+ preview = self.request.registry.queryMultiAdapter((paragraph, self.render_request), IParagraphPreview)
+ if preview is not None:
+ preview.language = language
+ preview.update()
+ return preview.render()