Commit 3456aeab authored by Vincent Pelletier's avatar Vincent Pelletier

Do not select unneeded columns.

Also, use select_dict instead of select_expression as the later is deprecated.
Reviewed by Jerome.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34684 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 002a3f62
......@@ -76,9 +76,7 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
'catalog.%s is not NULL' % workflow_state
params['group_by'] = ('catalog.portal_type',
'catalog.%s' % workflow_state)
params['select_expression'] = (
'catalog.path, count(catalog.uid) as count, catalog.portal_type, catalog.%s'
% workflow_state)
params['select_dict'] = {'count': 'count(catalog.uid)'}
for brain in selection_tool.callSelectionFor(selection_name, params=params):
doc = brain.getObject()
......
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