Commit 7ffe76cd authored by Romain Courteaud's avatar Romain Courteaud

Prevent displaying useless empty list or list with only one element


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21614 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 012aab00
...@@ -1095,6 +1095,11 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ): ...@@ -1095,6 +1095,11 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
selection_name, selection_name,
current_uid_list) current_uid_list)
field_value = str(field_value).splitlines() field_value = str(field_value).splitlines()
# Prevent displaying useless empty list or list with only one element
if not field_value:
field_value = ''
if len(field_value) == 1:
field_value = field_value[0]
REQUEST.form[field_key] = field_value REQUEST.form[field_key] = field_value
portal_status_message = Message( portal_status_message = Message(
domain='erp5_ui', domain='erp5_ui',
......
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