From 16ab6ee5db0989f2818a7452eef093f6d5baeb8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Tue, 11 Dec 2007 13:55:09 +0000 Subject: [PATCH] fix variable naming, there's no "arity" with subobjects git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18232 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/Constraint/ContentExistence.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/product/ERP5Type/Constraint/ContentExistence.py b/product/ERP5Type/Constraint/ContentExistence.py index 6d35cd7b6b..898f3f1c3f 100644 --- a/product/ERP5Type/Constraint/ContentExistence.py +++ b/product/ERP5Type/Constraint/ContentExistence.py @@ -49,11 +49,9 @@ class ContentExistence(Constraint): obj = object errors = [] if self._checkConstraintCondition(object): - # Retrieve values inside de PropertySheet (_constraints) + # Retrieve configuration values from PropertySheet (_constraints) portal_type = self.constraint_definition['portal_type'] - # Check arity and compare it with the min and max - arity = len(obj.contentValues(portal_type=portal_type)) - if (arity == 0): + if not len(obj.contentValues(portal_type=portal_type)): # Generate error message error_message = "Does not contain any subobject" if portal_type is not (): @@ -61,3 +59,4 @@ class ContentExistence(Constraint): # Add error errors.append(self._generateError(obj, error_message)) return errors + -- 2.30.9