[Erp5-report] r8492 - /erp5/trunk/products/ERP5Type/Constraint/PropertyTypeValidity.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jul 18 16:06:24 CEST 2006
Author: alex
Date: Tue Jul 18 16:06:20 2006
New Revision: 8492
URL: http://svn.erp5.org?rev=8492&view=rev
Log:
if a property is marked as multivalued, is should be checked as type 'lines',
and not, for example, 'string' or 'float'
Modified:
erp5/trunk/products/ERP5Type/Constraint/PropertyTypeValidity.py
Modified: erp5/trunk/products/ERP5Type/Constraint/PropertyTypeValidity.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Constraint/PropertyTypeValidity.py?rev=8492&r1=8491&r2=8492&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Constraint/PropertyTypeValidity.py (original)
+++ erp5/trunk/products/ERP5Type/Constraint/PropertyTypeValidity.py Tue Jul 18 16:06:20 2006
@@ -33,7 +33,7 @@
class PropertyTypeValidity(Constraint):
"""
- This constraint class allows to check / fix type of each
+ This constraint class allows to check / fix type of each
attributes define in the PropertySheets.
This Constraint is always created in ERP5Type/Utils.py
"""
@@ -63,7 +63,10 @@
# For each attribute name, we check type
for property in object.propertyMap():
property_id = property['id']
- property_type = property['type']
+ if property.get('multivalued', 0):
+ property_type = 'lines'
+ else:
+ property_type = property['type']
wrong_type = 0
value = object.getProperty(property_id)
if value is not None:
More information about the Erp5-report
mailing list