Commit 8af1da02 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

ListBox: support rendering empty item as user's input in multi item widget having default values.

parent ef488b49
......@@ -2461,6 +2461,12 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine):
editable_field.generate_field_key(key=key), request)
except (KeyError, AttributeError):
display_value = original_value
if isinstance(editable_field.widget, Widget.MultiItemsWidget) and \
not isinstance(display_value, list):
if display_value:
display_value = [display_value]
else:
display_value = []
# If error on current field, we should display message
if key in error_dict:
error_text = error_dict[key].error_text
......
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