Commit 2febf7d1 authored by Arnaud Fontaine's avatar Arnaud Fontaine

For Category Existence and Category Membership Arity ZODB Constraints,

'constraint_portal_type' is a TALES expression since r42928 so update
their documents to evaluate the expression when checking the
consistency



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43037 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d98f6513
......@@ -69,7 +69,9 @@ class CategoryExistenceConstraint(ConstraintMixin):
Check the object's consistency.
"""
error_list = []
portal_type_list = self.getConstraintPortalTypeList()
portal_type_list = self._getExpressionValue(obj,
self.getConstraintPortalType())
# For each attribute name, we check if defined
for base_category in self.getConstraintBaseCategoryList():
mapping = dict(base_category=base_category)
......
......@@ -77,7 +77,8 @@ class CategoryMembershipArityConstraint(ConstraintMixin):
base_category_list = self.getConstraintBaseCategoryList()
min_arity = self.getMinArity()
max_arity = self.getMaxArity()
portal_type_list = self.getConstraintPortalTypeList()
portal_type_list = self._getExpressionValue(obj,
self.getConstraintPortalType())
# Check arity and compare it with the min and max
arity = self._calculateArity(obj, base_category_list, portal_type_list)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment