diff --git a/src/fmu/sumo/explorer/objects/_document_collection.py b/src/fmu/sumo/explorer/objects/_document_collection.py index a1eab8df..2a9ddcd3 100644 --- a/src/fmu/sumo/explorer/objects/_document_collection.py +++ b/src/fmu/sumo/explorer/objects/_document_collection.py @@ -198,8 +198,8 @@ async def _next_batch_async(self) -> List[Dict]: if self._pit is not None: query["pit"] = self._pit.get_pit_object() - res = await self._sumo.post_async("/search", json=query).json() - hits = res["hits"] + res = await self._sumo.post_async("/search", json=query) + hits = res.json()["hits"] if self._len is None: self._len = hits["total"]["value"]