Commit 26409a25 authored by Rafael Monnerat's avatar Rafael Monnerat

set sort_order if defined.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24112 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 26660904
...@@ -77,6 +77,8 @@ def sortValueList(value_list, sort_on=None, sort_order=None, **kw): ...@@ -77,6 +77,8 @@ def sortValueList(value_list, sort_on=None, sort_order=None, **kw):
sort_on = tuple([isinstance(x, str) and x or tuple(x) for x in sort_on]) sort_on = tuple([isinstance(x, str) and x or tuple(x) for x in sort_on])
try: try:
sort_kw = sort_kw_cache[sort_on] sort_kw = sort_kw_cache[sort_on]
if sort_order is not None:
sort_kw["reverse"] = (sort_order in ('descending', 'reverse', 'DESC'))
except KeyError: except KeyError:
new_sort_on = [] new_sort_on = []
reverse_dict = {} reverse_dict = {}
......
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