Fix negated autokey guard logic (#308)

This commit is contained in:
Michael Manfre 2022-12-28 22:08:52 -05:00 committed by GitHub
parent a2f0634cb2
commit 6983763786
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -174,7 +174,7 @@ class Settings(BaseSettings):
SETUP = Settings() SETUP = Settings()
# Don't allow automatic keys in production # 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") print("You must set TAKAHE_SECRET_KEY in production")
sys.exit(1) sys.exit(1)
SECRET_KEY = SETUP.SECRET_KEY SECRET_KEY = SETUP.SECRET_KEY