Added tests in widgets update method
authorThierry Florac <thierry.florac@onf.fr>
Tue, 16 May 2017 11:19:31 +0200
changeset 78 c495f40d039e
parent 77 10d2372f54bb
child 79 4a31bf48560b
Added tests in widgets update method
src/pyams_security/zmi/plugin/userfolder.py
--- a/src/pyams_security/zmi/plugin/userfolder.py	Tue May 16 11:18:46 2017 +0200
+++ b/src/pyams_security/zmi/plugin/userfolder.py	Tue May 16 11:19:31 2017 +0200
@@ -127,7 +127,8 @@
 
     def updateWidgets(self, prefix=None):
         super(UsersFolderEditForm, self).updateWidgets()
-        self.widgets['prefix'].mode = DISPLAY_MODE
+        if 'prefix' in self.widgets:
+            self.widgets['prefix'].mode = DISPLAY_MODE
 
 
 @view_config(name='properties.json', context=IUsersFolderPlugin, request_type=IPyAMSLayer,