From 870c64db0b8db2a660d89e06b417a90e382d3e71 Mon Sep 17 00:00:00 2001 From: Garrett Hyde Date: Thu, 2 Feb 2017 01:10:49 -0800 Subject: [PATCH] Allow database service names to contain dashes. Fixes #77 --- project/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/database.py b/project/database.py index 879b9a3..f2a2f18 100644 --- a/project/database.py +++ b/project/database.py @@ -11,7 +11,7 @@ engines = { def config(): - service_name = os.getenv('DATABASE_SERVICE_NAME', '').upper() + service_name = os.getenv('DATABASE_SERVICE_NAME', '').upper().replace('-', '_') if service_name: engine = engines.get(os.getenv('DATABASE_ENGINE'), engines['sqlite']) else: