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): ...@@ -46,6 +46,7 @@ class PropertyTypeValidity(Constraint):
'boolean': (type(1), ), 'boolean': (type(1), ),
'float': (type(1.0), ), 'float': (type(1.0), ),
'long': (type(1L), ), 'long': (type(1L), ),
'tales': (type('string:3'), ),
'lines': (type([]), type(())), 'lines': (type([]), type(())),
'tokens': (type([]), type(())), 'tokens': (type([]), type(())),
'selection': (type([]), type(())), 'selection': (type([]), type(())),
...@@ -100,9 +101,7 @@ class PropertyTypeValidity(Constraint): ...@@ -100,9 +101,7 @@ class PropertyTypeValidity(Constraint):
wrong_type = 0 wrong_type = 0
error_message = "Attribute %s is defined with unknown type %s" % \ error_message = "Attribute %s is defined with unknown type %s" % \
(property_id, property_type) (property_id, property_type)
errors += [(object.getRelativeUrl(), errors.append(self._generateError(object, error_message))
'PropertyTypeValidity inconsistency',
100, error_message)]
if wrong_type: if wrong_type:
# Type is wrong, so, raise constraint error # Type is wrong, so, raise constraint error
error_message = \ 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