Skip to content

Commit

Permalink
Project id cannot be none in get_info
Browse files Browse the repository at this point in the history
  • Loading branch information
larsevj committed Feb 11, 2025
1 parent 4848794 commit be2fe82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions webviz_ert/data_loader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def escape(s: str) -> str:
return quote(quote(s, safe=""))


def get_connection_info(project_id: Optional[str] = None) -> Mapping[str, str]:
def get_connection_info(project_id: str) -> Mapping[str, str]:
from ert.shared.storage.connection import get_info

if project_id not in connection_info_map:
Expand Down Expand Up @@ -246,13 +246,13 @@ def refresh_data(self) -> requests.Response:
return self._post("updates/facade")


def get_data_loader(project_id: Optional[str] = None) -> DataLoader:
def get_data_loader(project_id: str) -> DataLoader:
return DataLoader(*(get_connection_info(project_id).values()))


def get_ensembles(project_id: Optional[str] = None) -> list:
def get_ensembles(project_id: str) -> list:
return get_data_loader(project_id).get_all_ensembles()


def refresh_data(project_id: Optional[str] = None) -> requests.Response:
def refresh_data(project_id: str) -> requests.Response:
return get_data_loader(project_id).refresh_data()

0 comments on commit be2fe82

Please sign in to comment.