From 512bce0ff6efd08fef5c4038c0b30a4e25d561f9 Mon Sep 17 00:00:00 2001 From: jasquat Date: Thu, 16 Feb 2023 11:18:50 -0500 Subject: [PATCH] the equal sign is not apart of the env var w/ burnettk --- src/spiffworkflow_backend/config/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spiffworkflow_backend/config/__init__.py b/src/spiffworkflow_backend/config/__init__.py index 79fccd2e..2edb57f7 100644 --- a/src/spiffworkflow_backend/config/__init__.py +++ b/src/spiffworkflow_backend/config/__init__.py @@ -45,7 +45,7 @@ def load_config_file(app: Flask, env_config_module: str) -> None: app.config.from_object(env_config_module) print(f"loaded config: {env_config_module}") except ImportStringError as exception: - if os.environ.get("SPIFFWORKFLOW_BACKEND_TERRAFORM_DEPLOYED_ENVIRONMENT=") != "true": + if os.environ.get("SPIFFWORKFLOW_BACKEND_TERRAFORM_DEPLOYED_ENVIRONMENT") != "true": raise ModuleNotFoundError( f"Cannot find config module: {env_config_module}" ) from exception @@ -85,7 +85,7 @@ def setup_config(app: Flask) -> None: env_config_prefix = "spiffworkflow_backend.config." if ( - os.environ.get("SPIFFWORKFLOW_BACKEND_TERRAFORM_DEPLOYED_ENVIRONMENT=") == "true" + os.environ.get("SPIFFWORKFLOW_BACKEND_TERRAFORM_DEPLOYED_ENVIRONMENT") == "true" and os.environ.get("SPIFFWORKFLOW_BACKEND_ENV") is not None ): load_config_file(app, f"{env_config_prefix}terraform_deployed_environment")