From ccb2c163a3133653d07c979edb92abdb19adffd0 Mon Sep 17 00:00:00 2001
From: Alexandre Boeglin <alex@nexedi.com>
Date: Tue, 18 Jul 2006 14:06:20 +0000
Subject: [PATCH] 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
---
 product/ERP5Type/Constraint/PropertyTypeValidity.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/product/ERP5Type/Constraint/PropertyTypeValidity.py b/product/ERP5Type/Constraint/PropertyTypeValidity.py
index 62e12bca23..30d5b11e33 100644
--- a/product/ERP5Type/Constraint/PropertyTypeValidity.py
+++ b/product/ERP5Type/Constraint/PropertyTypeValidity.py
@@ -33,7 +33,7 @@ from DateTime import DateTime
 
 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 @@ class PropertyTypeValidity(Constraint):
     # 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:
-- 
2.30.9