Commit 2bdb163d authored by Bartek Górny's avatar Bartek Górny

use catalog for sorting result

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11523 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7849eed6
......@@ -74,7 +74,7 @@ reference=kw.get(\'reference\')\n
if reference is None:\n
return []\n
\n
searchargs=dict(reference=reference,portal_type=context.getPortalDocumentTypeList(),sort_on=\'version\')\n
searchargs=dict(reference=reference,portal_type=context.getPortalDocumentTypeList(),sort_on=\'version\',sort_order=\'descending\')\n
language=kw.get(\'language\')\n
if language is not None:\n
searchargs[\'language\']=language\n
......@@ -82,7 +82,6 @@ version=kw.get(\'version\')\n
if version is not None:\n
searchargs[\'version\']=version\n
res=list(context.portal_catalog(**searchargs))\n
res.reverse() # can catalog do reverse sorting?\n
return res\n
</string> </value>
</item>
......
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