From 2f6ee65f331f56586d287af6cf8dd92e751da215 Mon Sep 17 00:00:00 2001 From: Kevin Chung Date: Tue, 5 May 2020 19:39:36 -0400 Subject: [PATCH] Only add SQLALCHEMY_ENGINE_OPTIONS under production databases --- CTFd/config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CTFd/config.py b/CTFd/config.py index 629f1a2..7ac2ef5 100644 --- a/CTFd/config.py +++ b/CTFd/config.py @@ -246,9 +246,10 @@ class Config(object): UPDATE_CHECK = not os.getenv("UPDATE_CHECK") # Defaults True APPLICATION_ROOT = os.getenv("APPLICATION_ROOT") or "/" SERVER_SENT_EVENTS = not os.getenv("SERVER_SENT_EVENTS") # Defaults True - SQLALCHEMY_ENGINE_OPTIONS = { - "max_overflow": int(os.getenv("SQLALCHEMY_MAX_OVERFLOW", 20)) - } + if DATABASE_URL.startswith("sqlite") is False: + SQLALCHEMY_ENGINE_OPTIONS = { + "max_overflow": int(os.getenv("SQLALCHEMY_MAX_OVERFLOW", 20)) + } """ === OAUTH ===