src/pyams_content/component/illustration/zmi/__init__.py
changeset 161 a5545e09b203
parent 146 221775601fe7
child 175 fb51fb6d6129
--- a/src/pyams_content/component/illustration/zmi/__init__.py	Wed Sep 13 12:30:05 2017 +0200
+++ b/src/pyams_content/component/illustration/zmi/__init__.py	Wed Sep 13 14:19:52 2017 +0200
@@ -103,7 +103,8 @@
         return IIllustration(self.context)
 
     def check_mode(self):
-        self.mode = self.parent_form.mode
+        if self.parent_form is not None:
+            self.mode = self.parent_form.mode
 
     def updateWidgets(self, prefix=None):
         super(IllustrationPropertiesInnerEditForm, self).updateWidgets(prefix)