Commit 8e283931 authored by Tomáš Peterka's avatar Tomáš Peterka Committed by Tomáš Peterka

[hal_json] Harden script when parsing portal_types

parent ff653f3d
...@@ -754,7 +754,7 @@ def renderField(traversed_document, field, form, value=None, meta_type=None, key ...@@ -754,7 +754,7 @@ def renderField(traversed_document, field, form, value=None, meta_type=None, key
# in that case we prefer non_empty version # in that case we prefer non_empty version
list_method_query_dict = default_params.copy() list_method_query_dict = default_params.copy()
if not list_method_query_dict.get("portal_type", []) and portal_type_list: if not list_method_query_dict.get("portal_type", []) and portal_type_list:
list_method_query_dict["portal_type"] = [x for x, _ in portal_type_list] list_method_query_dict["portal_type"] = [x[0] for x in portal_type_list]
list_method_custom = None list_method_custom = None
# Search for non-editable documents - all reports goes here # Search for non-editable documents - all reports goes here
......
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