Commit ccb2c163 authored by Alexandre Boeglin's avatar Alexandre Boeglin

if a property is marked as multivalued, is should be checked as type 'lines',

  and not, for example, 'string' or 'float'


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8492 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 320d96ce
...@@ -33,7 +33,7 @@ from DateTime import DateTime ...@@ -33,7 +33,7 @@ from DateTime import DateTime
class PropertyTypeValidity(Constraint): 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. attributes define in the PropertySheets.
This Constraint is always created in ERP5Type/Utils.py This Constraint is always created in ERP5Type/Utils.py
""" """
...@@ -63,7 +63,10 @@ class PropertyTypeValidity(Constraint): ...@@ -63,7 +63,10 @@ class PropertyTypeValidity(Constraint):
# For each attribute name, we check type # For each attribute name, we check type
for property in object.propertyMap(): for property in object.propertyMap():
property_id = property['id'] property_id = property['id']
property_type = property['type'] if property.get('multivalued', 0):
property_type = 'lines'
else:
property_type = property['type']
wrong_type = 0 wrong_type = 0
value = object.getProperty(property_id) value = object.getProperty(property_id)
if value is not None: if value is not None:
......
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