From 04062aaa64da9ab4c0433190ff0511865f51a045 Mon Sep 17 00:00:00 2001 From: kitt Date: Tue, 28 Nov 2023 15:41:38 -0500 Subject: [PATCH] fix settings --- splashcat/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/splashcat/settings.py b/splashcat/settings.py index 6639647d..9ee2ee75 100644 --- a/splashcat/settings.py +++ b/splashcat/settings.py @@ -141,14 +141,14 @@ database_url = os.environ.get("DATABASE_URL") -if database_url is None: +if database_url is None or (len(sys.argv) > 1 and sys.argv[1] == 'collectstatic'): DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': BASE_DIR / 'db.sqlite3', } } -elif len(sys.argv) > 1 and sys.argv[1] != 'collectstatic': +else: database_connection_details = dj_database_url.parse(database_url, conn_max_age=None, conn_health_checks=False) if FLY_REGION != FLY_PRIMARY_REGION: