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

Fixed repo upload order.

parent e1bcd545
Pipeline #68329 passed with stages
in 30 minutes and 58 seconds
......@@ -523,7 +523,7 @@ class SearchRequest:
if order_by is None:
composite = dict(sources={name: terms}, size=size)
sort_terms = A('terms', field=order_by)
sort_terms = A('terms', field=order_by, order=order)
composite = dict(sources=[{order_by: sort_terms}, {name: terms}], size=size)
if after is not None:
if order_by is None:
......@@ -790,9 +790,9 @@ class TestRepo():
uploads = data.get('uploads', None)
assert uploads is not None
values = uploads['values']
# the 4 uploads have "example upload id", but 3 have older upload time. Therefore,
# only 1 calc will be in the (today, "example upload id") bucket.
assert values['example_upload_id']['total'] == 1
# the 4 uploads have "example upload id", but 3 have newer upload time. Therefore,
# only 3 calc will be in the last (and therefore used) bucket of 'example_upload_id'.
assert values['example_upload_id']['total'] == 3
assert values['example_upload_id']['examples'][0]['upload_id'] == 'example_upload_id'
assert 'after' in uploads
assert 'uploads' in data['statistics']['total']['all']
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