Use reverse order in sorted merge mode
authorThierry Florac <thierry.florac@onf.fr>
Thu, 05 Jul 2018 12:01:22 +0200
changeset 802 3c71b1d0a370
parent 801 c7585a24ca8b
child 803 1fd2ceec9fbf
Use reverse order in sorted merge mode
src/pyams_content/shared/view/merge.py
--- a/src/pyams_content/shared/view/merge.py	Thu Jul 05 10:04:14 2018 +0200
+++ b/src/pyams_content/shared/view/merge.py	Thu Jul 05 12:01:22 2018 +0200
@@ -117,7 +117,7 @@
                                            ignore_cache=ignore_cache),
                           key=cls.sort_key, reverse=True)
                    for view in views)
-        yield from merge(*results, key=cls.sort_key)
+        yield from merge(*results, key=cls.sort_key, reverse=True)
 
 
 @utility_config(name='{0}.sort'.format(CREATION_DATE_ORDER), provides=IViewsMerger)