[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/container/constraints.py Bug fix, which I believe is correct -- Jim to verify.

Garrett Smith garrett at mojave-corp.com
Wed Jun 16 12:36:45 EDT 2004


Log message for revision 25882:
Bug fix, which I believe is correct -- Jim to verify.


-=-
Modified: Zope3/trunk/src/zope/app/container/constraints.py
===================================================================
--- Zope3/trunk/src/zope/app/container/constraints.py	2004-06-16 16:22:36 UTC (rev 25881)
+++ Zope3/trunk/src/zope/app/container/constraints.py	2004-06-16 16:36:44 UTC (rev 25882)
@@ -201,17 +201,18 @@
                     return False
 
     # check the constraint on __parent__
-    __parent__ = factory.getInterfaces().get('__parent__')
-    if __parent__ is not None:
-        try:
-            validate = __parent__.validate
-        except AttributeError:
-            pass
-        else:
+    for iface in factory.getInterfaces():
+        __parent__ = iface.get('__parent__')
+        if __parent__ is not None:
             try:
-                validate(container)
-            except zope.interface.Invalid:
-                return False
+                validate = __parent__.validate
+            except AttributeError:
+                pass
+            else:
+                try:
+                    validate(container)
+                except zope.interface.Invalid:
+                    return False
 
     return True
 




More information about the Zope3-Checkins mailing list