Commit 0c0ce4d6 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

erp5_hal_json_style: Fix RelationStringField when portal_type is not a tuple with two value

The value used to be displayed will be the last value of the tuple
parent c284f7c6
......@@ -251,7 +251,7 @@ def renderField(traversed_document, field, form_relative_url, value=None, meta_t
result["portal_type"] = field.get_value('portal_type')
result["query"] = url_template_dict["jio_search_template"] % {
"query": make_query({"query": sql_catalog.buildQuery(
dict(portal_type = [x[1] for x in result["portal_type"]],
dict(portal_type = [x[-1] for x in result["portal_type"]],
**result["default_params"]), ignore_unknown_columns=True
).asSearchTextExpression(sql_catalog)})
}
......
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