Commit e334f2d3 authored by Romain Courteaud's avatar Romain Courteaud

Bug correction.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2397 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7c765538
......@@ -296,7 +296,13 @@ class RelationStringFieldValidator(Validator.StringValidator):
# Will be interpreted by Base_edit as "do nothing"
if relation_uid not in (None, ''):
# A value has been defined by the user
if type(relation_uid) in (type([]), type(())): relation_uid = relation_uid[0]
if type(relation_uid) in (type([]), type(())):
if len( relation_uid ) == 0:
# No object was selected...
self.raise_error('relation_result_too_long', field)
else:
relation_uid = relation_uid[0]
related_object = portal_catalog.getObject(relation_uid)
if related_object is not None:
display_text = str(related_object.getProperty(catalog_index))
......
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