From 1566df65cb5faab90e81cc24bb94839536c34e42 Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Mon, 14 Mar 2022 18:42:49 -0500 Subject: [PATCH] better sanity checking --- app/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/__init__.py b/app/__init__.py index b01e6f2..492c5c7 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -193,7 +193,8 @@ def register_settings(app): 'APP_DATABASE_URI', app.config['APP_DATABASE_URI'] ) - if app.config['SECRET_KEY'] == "" or "" in app.config['APP_DATABASE_URI']: + if app.config['SECRET_KEY'] == "" or \ + app.config['APP_DATABASE_URI'] == "mysql+pymysql://:@:/": raise("No database uri or secret Key") # try to get overides, otherwise just use what we have already app.config['USER_ENABLE_REGISTER'] = os.getenv(