Updated view's sort index selection
authorThierry Florac <tflorac@ulthar.net>
Fri, 14 Dec 2018 11:12:11 +0100
changeset 1168 3b177d6db9db
parent 1167 04429c162338
child 1169 04cf19b3985f
Updated view's sort index selection
src/pyams_content/shared/view/__init__.py
--- a/src/pyams_content/shared/view/__init__.py	Fri Dec 14 11:08:28 2018 +0100
+++ b/src/pyams_content/shared/view/__init__.py	Fri Dec 14 11:12:11 2018 +0100
@@ -215,7 +215,7 @@
         catalog = get_utility(ICatalog)
         registry = get_current_registry()
         params = self.get_params(context, request)
-        if sort_index == RELEVANCE_ORDER:
+        if (not sort_index) or (sort_index == RELEVANCE_ORDER):
             sort_index = None
         query = CatalogQuery(catalog).query(params,
                                             sort_index=sort_index,