Commit f9683556 authored by Jérome Perrin's avatar Jérome Perrin

this code is also used for single relation field, where value is a string


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44305 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ad8731c3
......@@ -335,6 +335,8 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
kw[k] = v
accessor_name = 'get%sValueList' % ''.join([part.capitalize() for part in base_category.split('_')])
jump_reference_list = getattr(here, accessor_name)(portal_type=portal_type, filter=kw)
if not isinstance(value, (list, tuple)):
value = value,
for jump_reference, display_value in zip(jump_reference_list, value):
string_list.append('<a href="%s">%s</a>' % \
(jump_reference.absolute_url(),
......
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