From a81af1c37bd0b193d47209f5e24137138dc3294d Mon Sep 17 00:00:00 2001 From: Dmitrii Gridnev Date: Fri, 8 Mar 2024 14:38:10 +0100 Subject: [PATCH] Fixed receiving environment from Qase --- qase-python-commons/pyproject.toml | 2 +- qase-python-commons/src/qaseio/commons/testops.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qase-python-commons/pyproject.toml b/qase-python-commons/pyproject.toml index 28fa0468..a86afbfc 100644 --- a/qase-python-commons/pyproject.toml +++ b/qase-python-commons/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "qase-python-commons" -version = "2.0.5" +version = "2.0.6" description = "A library for Qase TestOps and Qase Report" readme = "README.md" authors = [{name = "Qase Team", email = "support@qase.io"}] diff --git a/qase-python-commons/src/qaseio/commons/testops.py b/qase-python-commons/src/qaseio/commons/testops.py index 4ed965cb..363c2486 100644 --- a/qase-python-commons/src/qaseio/commons/testops.py +++ b/qase-python-commons/src/qaseio/commons/testops.py @@ -90,7 +90,7 @@ def _get_environment(self, environment: str, project: str): api_instance = EnvironmentsApi(self.client) response = api_instance.get_environments(code=project) if hasattr(response, 'result'): - for env in response["result"]["entities"]: + for env in response.result.entities: if env["slug"] == environment: return env["id"] return None