Commit f577a737 authored by Romain Courteaud's avatar Romain Courteaud

Allow CategoryMembershipArityConstraint to handle acquisition.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43278 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 149ffb70
...@@ -64,6 +64,10 @@ class CategoryMembershipArityConstraint(ConstraintMixin): ...@@ -64,6 +64,10 @@ class CategoryMembershipArityConstraint(ConstraintMixin):
(PropertySheet.CategoryMembershipArityConstraint,) (PropertySheet.CategoryMembershipArityConstraint,)
def _calculateArity(self, obj, base_category_list, portal_type_list): def _calculateArity(self, obj, base_category_list, portal_type_list):
if self.getUseAcquisition():
return len(obj.getAcquiredCategoryMembershipList(base_category_list,
portal_type=portal_type_list))
else:
return len(obj.getCategoryMembershipList(base_category_list, return len(obj.getCategoryMembershipList(base_category_list,
portal_type=portal_type_list)) portal_type=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