Commit 3cea3dda authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Fixed wrong scroll information in API.

parent 78e43ee2
......@@ -619,7 +619,7 @@ class SearchRequest:
es.clear_scroll(body={'scroll_id': [scroll_id]}, ignore=(404, )) # pylint: disable=E1123
scroll_id = None
scroll_info = dict(total=total, size=size)
scroll_info = dict(total=total, size=size, scroll=True)
if scroll_id is not None:
scroll_info.update(scroll_id=scroll_id)
......
......@@ -1202,7 +1202,9 @@ class TestRepo():
while scroll_id is not None:
rv = api.get('/repo/?scroll=1m&scroll_id=%s' % scroll_id)
data = json.loads(rv.data)
scroll_id = data.get('scroll', {}).get('scroll_id', None)
scroll_info = data.get('scroll', {})
assert scroll_info['scroll']
scroll_id = scroll_info.get('scroll_id', None)
has_another_page |= len(data.get('results')) > 0
if n_results < 2:
......
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