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): ...@@ -76,9 +76,7 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
'catalog.%s is not NULL' % workflow_state 'catalog.%s is not NULL' % workflow_state
params['group_by'] = ('catalog.portal_type', params['group_by'] = ('catalog.portal_type',
'catalog.%s' % workflow_state) 'catalog.%s' % workflow_state)
params['select_expression'] = ( params['select_dict'] = {'count': 'count(catalog.uid)'}
'catalog.path, count(catalog.uid) as count, catalog.portal_type, catalog.%s'
% workflow_state)
for brain in selection_tool.callSelectionFor(selection_name, params=params): for brain in selection_tool.callSelectionFor(selection_name, params=params):
doc = brain.getObject() 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