From 2cc34496ecb7b8e72def39410dca9a4fadd88ff3 Mon Sep 17 00:00:00 2001
From: David Huss <dh@atoav.com>
Date: Wed, 13 Jan 2021 13:33:45 +0100
Subject: [PATCH] ENV replaces - with _ now

---
 stechuhr_server/config.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stechuhr_server/config.py b/stechuhr_server/config.py
index 27c3be3..904cb12 100644
--- a/stechuhr_server/config.py
+++ b/stechuhr_server/config.py
@@ -67,7 +67,7 @@ def initialize_config(application_name: str, default_config: str, app) -> dict:
 
     # Generate a environment variable name from the application name
     # E.g. "foo bar" becomes "FOO_BAR_CONFIG_PATH"
-    config_path_environment_variable = "{}_CONFIG_PATH".format(application_name.upper().replace(" ", "_"))
+    config_path_environment_variable = "{}_CONFIG_PATH".format(application_name.upper().replace(" ", "_").replace("-", "_"))
 
     # If the environment variable is set, use that as a config path, otherwise use the default one
     config_dir = this_or_else(os.environ.get(config_path_environment_variable), dirs["config"])
-- 
GitLab