diff --git a/tests/test_webservice.py b/tests/test_webservice.py index 1092dab4aee72c9c023771d318a806405675f025..692e0ad121c54f5ee513d3a1cbc5e844c4968d56 100644 --- a/tests/test_webservice.py +++ b/tests/test_webservice.py @@ -408,9 +408,7 @@ async def test_get_slurm_nice_fails(fp): async def test_skip_runs(run_type: str, experiment_type_id:int, should_skip: bool): res_run_by_id = mock.Mock() res_run_by_id.status_code = 200 - res_run_by_id.json = lambda: { - "data_groups_repositories": [{"experiment": {"name": run_type, "id": 0}}] - } + res_run_by_id.json = lambda: {"experiment": {"name": run_type, "id": 0}} res_experiment_by_id = mock.Mock() res_experiment_by_id.status_code = 200 diff --git a/webservice/webservice.py b/webservice/webservice.py index 55a8a84ff09355c83b1fc7f12121976777126022..efedd964dfe76c3266910043f8690aae639c4df8 100644 --- a/webservice/webservice.py +++ b/webservice/webservice.py @@ -631,7 +631,7 @@ async def check_run_type_skip( ) try: - experiment = res.json()["data_groups_repositories"][0]["experiment"] + experiment = res.json()["experiment"] run_type = experiment["name"] if any(re.search(m, run_type) for m in config[action]["skip-run-types"]): return True