do not raise if the app cannot load an env specific config file w/ burnettk

This commit is contained in:
jasquat 2023-07-24 11:51:03 -04:00
parent 4d471b019a
commit 2b2234844c
No known key found for this signature in database
1 changed files with 3 additions and 3 deletions

View File

@ -68,9 +68,9 @@ def load_config_file(app: Flask, env_config_module: str) -> None:
try:
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":
raise ModuleNotFoundError(f"Cannot find config module: {env_config_module}") from exception
except ImportStringError:
# ignore this error
pass
def _set_up_tenant_specific_fields_as_list_of_strings(app: Flask) -> None: