Commit 509885be authored by Jérome Perrin's avatar Jérome Perrin

ListBox: ignore non string request keys

This can happen when request is used as a cache storage, especially
after eab00f14 (deferred_style: Properly keep request parameters,
2021-03-10)
parent 37c3fc43
...@@ -1205,6 +1205,8 @@ class ListBoxRenderer: ...@@ -1205,6 +1205,8 @@ class ListBoxRenderer:
# (i.e. do not update parameters in listboxes intended to show a previously defined selection. # (i.e. do not update parameters in listboxes intended to show a previously defined selection.
listbox_prefix = '%s_' % self.getId() listbox_prefix = '%s_' % self.getId()
for k, v in six.iteritems(self.request.form): for k, v in six.iteritems(self.request.form):
if not isinstance(k, str):
continue
# Ignore selection keys. # Ignore selection keys.
if k.endswith('selection_key'): if k.endswith('selection_key'):
continue continue
......
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