Small optimization
authorThierry Florac <thierry.florac@onf.fr>
Mon, 11 Jun 2018 14:42:25 +0200
changeset 607 5f4b5b3d5d0d
parent 606 118d32d0ac38
child 608 03a373d91db5
Small optimization
src/pyams_content/component/paragraph/zmi/preview.py
--- a/src/pyams_content/component/paragraph/zmi/preview.py	Mon Jun 11 12:43:43 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/preview.py	Mon Jun 11 14:42:25 2018 +0200
@@ -37,7 +37,8 @@
         super(ParagraphsContainerRenderer, self).__init__(context, request)
         paragraphs = [para for para in IParagraphContainer(self.context).values()
                       if para.visible]
-        self.renderers = [self.request.registry.queryMultiAdapter((paragraph, self.request), IParagraphRenderer)
+        registry = self.request.registry
+        self.renderers = [registry.queryMultiAdapter((paragraph, self.request), IParagraphRenderer)
                           for paragraph in paragraphs]
 
     def update(self):