fix issue when SECRET_KEY is not provided

This commit is contained in:
odysseusmax 2021-06-14 09:36:11 +05:30
parent ce1aec90a9
commit 71f0a11789
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ if not logo_folder.exists():
username = os.environ.get("TGINDEX_USERNAME", "")
password = os.environ.get("PASSWORD", "")
SHORT_URL_LEN = int(os.environ.get("SHORT_URL_LEN", 3))
authenticated = username and password
authenticated = bool(username and password)
SESSION_COOKIE_LIFETIME = int(os.environ.get("SESSION_COOKIE_LIFETIME") or "60")
try:
SECRET_KEY = os.environ["SECRET_KEY"]