From bda6945093a891400f1e6df63b537aa4a03e2c5d Mon Sep 17 00:00:00 2001
From: Nicolas Dumazet <nicolas.dumazet@nexedi.com>
Date: Fri, 24 Dec 2010 07:08:43 +0000
Subject: [PATCH] this code should only apply to filesystem constraints, if
 const is a dict

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41743 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/Utils.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/product/ERP5Type/Utils.py b/product/ERP5Type/Utils.py
index 76e7f871b5..2a3dfe2360 100644
--- a/product/ERP5Type/Utils.py
+++ b/product/ERP5Type/Utils.py
@@ -1346,8 +1346,11 @@ def setDefaultProperties(property_holder, object=None, portal=None):
         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, object=None, portal=None):
       # 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
-- 
2.30.9