Commit d0ce0b9c authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_hal_json_style: consider count(*) in regex

parent adfe6e53
Pipeline #15568 failed with stage
......@@ -1864,8 +1864,8 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
else:
catalog_kw['group_by_list'] = [str(group_by)]
# Include select, as user may want to count
# For now, consider only functions, for example, count(column_name) or COUNT(column name)
catalog_kw["select_list"] = [x for x in select_list if re.match(r"^\D+\(\w+\)$", x)]
# For now, consider only functions, for example, count(column_name) or COUNT(column name) or count(*)
catalog_kw["select_list"] = [x for x in select_list if re.match(r"^\D+\(.*\)$", x)]
if limit:
catalog_kw["limit"] = limit
......
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