diff --git a/conftest.py b/conftest.py index 1e8d5dfe..3cf58951 100644 --- a/conftest.py +++ b/conftest.py @@ -96,13 +96,13 @@ def web3(): @pytest.fixture def free_c2d_env(): - environments = get_c2d_environments()[8996] + environments = get_c2d_environments(flat=True) return next(env for env in environments if float(env["priceMin"]) == float(0)) @pytest.fixture def paid_c2d_env(): - environments = get_c2d_environments()[8996] + environments = get_c2d_environments(flat=True) return next(env for env in environments if env["id"] == "ocean-compute-env2") diff --git a/ocean_provider/routes/compute.py b/ocean_provider/routes/compute.py index ad3956a1..da33f548 100644 --- a/ocean_provider/routes/compute.py +++ b/ocean_provider/routes/compute.py @@ -124,7 +124,7 @@ def initializeCompute(): logger, ) - if not check_environment_exists(get_c2d_environments(), compute_env): + if not check_environment_exists(get_c2d_environments(flat=True), compute_env): return error_response("Compute environment does not exist", 400, logger) approve_params = {"datasets": []} if datasets else {}