Commit 688420f8 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fixup! ListBox: support rendering empty item as user's input in multi item...

fixup! ListBox: support rendering empty item as user's input in multi item widget having default values.
parent 8712c638
...@@ -2461,7 +2461,8 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine): ...@@ -2461,7 +2461,8 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine):
editable_field.generate_field_key(key=key), request) editable_field.generate_field_key(key=key), request)
except (KeyError, AttributeError): except (KeyError, AttributeError):
display_value = original_value display_value = original_value
if isinstance(editable_field.widget, Widget.MultiItemsWidget) and \ if isinstance(editable_field.getRecursiveTemplateField().widget,
  • Is this safe to call on non-proxy fields ? (I do not find traces of this in the code) It should probably be, with "return self", saving a lot of code complexity.

  • Yes, safe as it is exactly implemented as you guess. But now I found that still 'default value by TALES' case does not work and I am fixing...

Please register or sign in to reply
Widget.MultiItemsWidget) and \
not isinstance(display_value, list): not isinstance(display_value, list):
if display_value: if display_value:
display_value = [display_value] display_value = [display_value]
......
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