[Erp5-report] r41743 nicolas.dumazet - /erp5/trunk/products/ERP5Type/Utils.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Dec 24 08:08:43 CET 2010


Author: nicolas.dumazet
Date: Fri Dec 24 08:08:43 2010
New Revision: 41743

URL: http://svn.erp5.org?rev=41743&view=rev
Log:
this code should only apply to filesystem constraints, if const is a dict

Modified:
    erp5/trunk/products/ERP5Type/Utils.py

Modified: erp5/trunk/products/ERP5Type/Utils.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Utils.py?rev=41743&r1=41742&r2=41743&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Utils.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Utils.py [utf8] Fri Dec 24 08:08:43 2010
@@ -1346,8 +1346,11 @@ def setDefaultProperties(property_holder
         new_cat_list.append(cat)
     cat_list = getExistingBaseCategoryList(portal, new_cat_list)
 
+    from Products.ERP5Type.mixin.constraint import ConstraintMixin
     for const in constraint_list:
-      for key, value in const.iteritems():
+      if isinstance(const, ConstraintMixin):
+        continue
+      for key, value in const.items():
         if isinstance(value, Expression):
           const[key] = value(econtext)
 
@@ -1522,7 +1525,6 @@ def setDefaultProperties(property_holder
       # Unnecessary to create these accessors more than once.
       base_category_dict.clear()
 
-    from Products.ERP5Type.mixin.constraint import ConstraintMixin
     property_holder.constraints = []
     for constraint in constraint_list:
       # ZODB Property Sheets constraints are no longer defined by a



More information about the Erp5-report mailing list