Commit d6c66bf6 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Use the right elastic properties for ordering. Fixes #142

parent 141954c4
......@@ -279,6 +279,8 @@ def _execute_paginated_search(
if order_by not in search_quantities:
raise KeyError('Unknown order quantity %s' % order_by)
_, order_by, _ = search_quantities[order_by]
search = search.sort(order_by if order == 1 else '-%s' % order_by)
paginated_search = search[(page - 1) * per_page: page * per_page]
response = paginated_search.execute() # pylint: disable=E1101
......
Supports Markdown
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