Added check for renderer interface changes
authorThierry Florac <thierry.florac@onf.fr>
Fri, 14 Sep 2018 14:25:28 +0200
changeset 949 db567982fb40
parent 948 6d3438907215
child 950 12ad545bc649
Added check for renderer interface changes
src/pyams_content/component/paragraph/zmi/__init__.py
--- a/src/pyams_content/component/paragraph/zmi/__init__.py	Thu Sep 13 17:19:03 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/__init__.py	Fri Sep 14 14:25:28 2018 +0200
@@ -242,7 +242,7 @@
                 get_json_paragraph_refresh_event(self.context, self.request))
         elif 'renderer' in self.widgets:
             renderer_interface = self.widgets['renderer'].field.interface
-            if 'renderer' in changes.get(renderer_interface):
+            if 'renderer' in changes.get(renderer_interface, ()):
                 output.setdefault('events', []).append(
                     get_json_widget_refresh_event(self.context, self.request, self.__class__, 'renderer'))
                 renderer = self.context.get_renderer(self.request)