Skip to content

Commit

Permalink
fix responses
Browse files Browse the repository at this point in the history
  • Loading branch information
HansKallekleiv committed Nov 24, 2023
1 parent 4066a15 commit 57821b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions backend/src/services/sumo_access/grid_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async def get_grid_geometry(self, grid_name: str, realization: int) -> xtgeo.Gri
)
stream = self._sumo_client.get(f"/objects('{geometry_blob_id}')/blob")
print(f"{grid_name} {realization} {geometry_blob_id} in {round(timer.lap_s(),2)}s")
grid_geom = xtgeo.grid_from_file(BytesIO(stream))
grid_geom = xtgeo.grid_from_file(BytesIO(stream.content))

return grid_geom

Expand All @@ -58,7 +58,7 @@ async def get_grid_parameter(
)
stream = self._sumo_client.get(f"/objects('{parameter_blob_id}')/blob")
print(f"{grid_name} {grid_parameter_name} {realization} {parameter_blob_id} in {round(timer.lap_s(),2)}s")
grid_param = xtgeo.gridproperty_from_file(BytesIO(stream))
grid_param = xtgeo.gridproperty_from_file(BytesIO(stream.content))
return grid_param

async def grids_have_equal_nxnynz(self, grid_name: str) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/sumo_access/queries/cpgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ async def get_nx_ny_nz_for_ensemble_grids(
"size": 1000,
}

response = await sumo_client.get_async("/search", payload)
response = await sumo_client.post_async("/search", json=payload)
result = response.json()
hits = result["hits"]["hits"]

Expand Down

0 comments on commit 57821b2

Please sign in to comment.