Commit e4daa4e6 authored by Alexandre Boeglin's avatar Alexandre Boeglin

add tales type, use _generateError


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5122 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ea5ae420
......@@ -46,6 +46,7 @@ class PropertyTypeValidity(Constraint):
'boolean': (type(1), ),
'float': (type(1.0), ),
'long': (type(1L), ),
'tales': (type('string:3'), ),
'lines': (type([]), type(())),
'tokens': (type([]), type(())),
'selection': (type([]), type(())),
......@@ -100,9 +101,7 @@ class PropertyTypeValidity(Constraint):
wrong_type = 0
error_message = "Attribute %s is defined with unknown type %s" % \
(property_id, property_type)
errors += [(object.getRelativeUrl(),
'PropertyTypeValidity inconsistency',
100, error_message)]
errors.append(self._generateError(object, error_message))
if wrong_type:
# Type is wrong, so, raise constraint error
error_message = \
......
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