Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yngve-sk committed Oct 31, 2024
1 parent 96cec2b commit 781d473
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/ert/gui/tools/plot/plot_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,14 @@ def observations_for_key(self, ensemble_ids: List[str], key: str) -> pd.DataFram
)
self._check_response(response)

observations = response.json()
observations_dfs = []

if not response.json():
continue
try:
response.json()[0]
observations = response.json()
observations_dfs = []
if not observations:
continue

observations[0] # Just preserving the old logic/behavior
# but this should really be revised
except (KeyError, IndexError, JSONDecodeError) as e:
raise httpx.RequestError(
f"Observation schema might have changed key={key}, ensemble_name={ensemble.name}, e={e}"
Expand Down

0 comments on commit 781d473

Please sign in to comment.