Order_by upload_time causes 500/Exception in v1 API
This happens on the example request on the API dashboard.
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/starlette/middleware/errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.7/site-packages/starlette/exceptions.py", line 82, in __call__
raise exc from None
File "/usr/local/lib/python3.7/site-packages/starlette/exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.7/site-packages/starlette/routing.py", line 566, in __call__
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.7/site-packages/starlette/routing.py", line 227, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.7/site-packages/starlette/routing.py", line 41, in app
response = await func(request)
File "/usr/local/lib/python3.7/site-packages/fastapi/routing.py", line 202, in app
dependant=dependant, values=values, is_coroutine=is_coroutine
File "/usr/local/lib/python3.7/site-packages/fastapi/routing.py", line 148, in run_endpoint_function
return await dependant.call(**values)
File "/app/nomad/app/v1/routers/entries.py", line 131, in post_entries_metadata_query
user_id=user.user_id if user is not None else None)
File "/app/nomad/app/v1/routers/entries.py", line 87, in perform_search
return search.search(*args, **kwargs)
File "/app/nomad/search.py", line 1150, in search
for name, aggregation in aggregations.items()})
File "/app/nomad/search.py", line 1150, in <dictcomp>
for name, aggregation in aggregations.items()})
File "/app/nomad/search.py", line 1061, in _es_to_api_aggregation
pagination.next_after = ':'.join(after_key.to_dict().values())
TypeError: sequence item 0: expected str instance, int found