Commit 70d29dc8 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Fixed broken upload order.

parent b8f536e5
Pipeline #75222 passed with stages
in 18 minutes and 53 seconds
...@@ -222,7 +222,7 @@ class RepoCalcsResource(Resource): ...@@ -222,7 +222,7 @@ class RepoCalcsResource(Resource):
for group_name, group_quantity in search_extension.groups.items(): for group_name, group_quantity in search_extension.groups.items():
if args.get(group_name, False): if args.get(group_name, False):
kwargs: Dict[str, Any] = {} kwargs: Dict[str, Any] = {}
if group_name == 'group_uploads': if group_name == 'uploads_grouped':
kwargs.update(order_by='upload_time', order='desc') kwargs.update(order_by='upload_time', order='desc')
search_request.quantity( search_request.quantity(
group_quantity.qualified_name, size=per_page, examples=1, group_quantity.qualified_name, size=per_page, examples=1,
......
...@@ -897,7 +897,7 @@ class TestRepo(): ...@@ -897,7 +897,7 @@ class TestRepo():
assert uploads is not None assert uploads is not None
values = uploads['values'] values = uploads['values']
assert values['example_upload_id']['total'] == 4 assert values['example_upload_id']['total'] == 3 # just three because of inconsistent upload time
assert values['example_upload_id']['examples'][0]['upload_id'] == 'example_upload_id' assert values['example_upload_id']['examples'][0]['upload_id'] == 'example_upload_id'
assert 'after' in uploads assert 'after' in uploads
assert 'uploads' in data['statistics']['total']['all'] assert 'uploads' in data['statistics']['total']['all']
......
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