[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/preference/preference.py Oops, made a small mistake.

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Apr 8 14:55:49 EDT 2005


Log message for revision 29920:
  Oops, made a small mistake.
  

Changed:
  U   Zope3/trunk/src/zope/app/preference/preference.py

-=-
Modified: Zope3/trunk/src/zope/app/preference/preference.py
===================================================================
--- Zope3/trunk/src/zope/app/preference/preference.py	2005-04-08 18:34:05 UTC (rev 29919)
+++ Zope3/trunk/src/zope/app/preference/preference.py	2005-04-08 18:55:48 UTC (rev 29920)
@@ -46,7 +46,7 @@
     zope.interface.implements(IPreferenceGroup, IReadContainer)
 
     # Declare attributes here, so that they are always available.
-    __id__ = None
+    __id__ = ''
     __schema__ = None
     __title__ = None
     __description__ = None
@@ -101,7 +101,6 @@
                    id.startswith(self.__id__) and \
                    id[cutoff:].find('.') == -1]
 
-
     def __getitem__(self, key):
         """See zope.app.container.interfaces.IReadContainer"""
         default = object()
@@ -164,7 +163,9 @@
             self.__dict__[key] = value
             # If the schema changed, we really need to change the security
             # checker as well.
-            self.__dict__['__Security_checker__'] = PreferenceGroupChecker(self)
+            if key is '__schema__':
+                checker = PreferenceGroupChecker(self)
+                self.__dict__['__Security_checker__'] = checker
 
     def __delattr__(self, key):
         if self.__schema__ and key in self.__schema__:



More information about the Zope3-Checkins mailing list