[Erp5-report] r18232 - /erp5/trunk/products/ERP5Type/Constraint/ContentExistence.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Dec 11 14:55:12 CET 2007
Author: jerome
Date: Tue Dec 11 14:55:09 2007
New Revision: 18232
URL: http://svn.erp5.org?rev=18232&view=rev
Log:
fix variable naming, there's no "arity" with subobjects
Modified:
erp5/trunk/products/ERP5Type/Constraint/ContentExistence.py
Modified: erp5/trunk/products/ERP5Type/Constraint/ContentExistence.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Constraint/ContentExistence.py?rev=18232&r1=18231&r2=18232&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Constraint/ContentExistence.py (original)
+++ erp5/trunk/products/ERP5Type/Constraint/ContentExistence.py Tue Dec 11 14:55:09 2007
@@ -49,11 +49,9 @@
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 @@
# Add error
errors.append(self._generateError(obj, error_message))
return errors
+
More information about the Erp5-report
mailing list