Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
HansKallekleiv committed Nov 23, 2023
1 parent 0010293 commit 0b4a2f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 2 additions & 6 deletions backend/src/services/sumo_access/queries/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
from sumo.wrapper import SumoClient


async def get_stratigraphic_column_identifier(
sumo_client: SumoClient, case_id: str
) -> str:
async def get_stratigraphic_column_identifier(sumo_client: SumoClient, case_id: str) -> str:
"""Get stratigraphic column identifier for a case (assuming unique for all objects)"""
params = {
"query": f"_sumo.parent_object:{case_id}",
Expand All @@ -15,9 +13,7 @@ async def get_stratigraphic_column_identifier(
response = await sumo_client.get_async("/search", params)
result = response.json()
hits = result["hits"]["hits"]
return hits[0]["_source"]["masterdata"]["smda"]["stratigraphic_column"][
"identifier"
]
return hits[0]["_source"]["masterdata"]["smda"]["stratigraphic_column"]["identifier"]


async def get_field_identifiers(sumo_client: SumoClient, case_id: str) -> List[str]:
Expand Down
4 changes: 1 addition & 3 deletions backend/src/services/sumo_access/queries/cpgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
from sumo.wrapper import SumoClient


async def get_grid_names(
sumo_client: SumoClient, case_id: str, iteration: str
) -> List[str]:
async def get_grid_names(sumo_client: SumoClient, case_id: str, iteration: str) -> List[str]:
"""Get a list of grid names for a case and iteration"""
payload = {
"size": 0,
Expand Down

0 comments on commit 0b4a2f1

Please sign in to comment.