Commit 098f82d0 authored by Vincent Pelletier's avatar Vincent Pelletier

group_by_resource alone has a meaning, for example if nodes are explicitely...

group_by_resource alone has a meaning, for example if nodes are explicitely selected (I was to get the total amount of that resource on [those nodes|that node]). It should not be prevented by code, because it leads to situation where providing just one grouping criterion causes no grouping to be done on final query, which causes in turn a SQL syntax error.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16056 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ad167b9c
......@@ -631,10 +631,9 @@ class SimulationTool(BaseTool):
group_by_expression_list.append('variation_text')
if group_by_movement:
group_by_expression_list.append('uid')
if group_by_resource:
group_by_expression_list.append('resource_uid')
if group_by_expression_list:
# by default, we group by resource
if group_by_resource:
group_by_expression_list.append('resource_uid')
new_kw['group_by'] = group_by_expression_list
return sql_kw, new_kw
......
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