From 698376378613b935c8af4f4d0fdfbb6b0cae0a8d Mon Sep 17 00:00:00 2001 From: Michael Manfre Date: Wed, 28 Dec 2022 22:08:52 -0500 Subject: [PATCH] Fix negated autokey guard logic (#308) --- takahe/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/takahe/settings.py b/takahe/settings.py index 5a26596..e8e61ac 100644 --- a/takahe/settings.py +++ b/takahe/settings.py @@ -174,7 +174,7 @@ class Settings(BaseSettings): SETUP = Settings() # Don't allow automatic keys in production -if SETUP.DEBUG and SETUP.SECRET_KEY.startswith("autokey-"): +if not SETUP.DEBUG and SETUP.SECRET_KEY.startswith("autokey-"): print("You must set TAKAHE_SECRET_KEY in production") sys.exit(1) SECRET_KEY = SETUP.SECRET_KEY