diff --git a/cosmos/dbt/graph.py b/cosmos/dbt/graph.py index 654fbfbe5..87739a081 100644 --- a/cosmos/dbt/graph.py +++ b/cosmos/dbt/graph.py @@ -103,7 +103,7 @@ def load(self, method: LoadMode = LoadMode.AUTOMATIC, execution_mode: str = "loc if self.project.is_manifest_available(): self.load_from_dbt_manifest() return - elif execution_mode in ("local", "virtualenv") and self.is_profile_yml_available(): + elif execution_mode in ("local", "virtualenv") and self.project.is_profile_yml_available(): try: self.load_via_dbt_ls() return diff --git a/cosmos/dbt/project.py b/cosmos/dbt/project.py index 994901954..4a7adbbaf 100644 --- a/cosmos/dbt/project.py +++ b/cosmos/dbt/project.py @@ -38,10 +38,10 @@ def is_manifest_available(self) -> bool: """ Checks if the `dbt` project manifest is set and if the file exists. """ - return self.project.manifest_path and Path(self.project.manifest_path).exists() + return self.manifest_path and Path(self.manifest_path).exists() def is_profile_yml_available(self) -> bool: """ Checks if the `dbt` profiles.yml file exists. """ - return Path(self.project.profile_path).exists() + return Path(self.profile_path).exists()