From 47d6cb03058e6d29d9463e3ea17e4cccf8d4c6a0 Mon Sep 17 00:00:00 2001 From: Jason Cameron Date: Thu, 3 Oct 2024 00:47:51 -0400 Subject: [PATCH] Fix settings Signed-off-by: Jason Cameron --- dmoj/settings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dmoj/settings.py b/dmoj/settings.py index 075e359b86..643ff8f679 100644 --- a/dmoj/settings.py +++ b/dmoj/settings.py @@ -602,10 +602,10 @@ WEBAUTHN_RP_ID = None -if os.environ.get('DEBUG', '0') == '1': - LOCAL_SETTINGS_PATH = os.path.join(os.path.dirname(__file__), 'local_settings.py') -else: +if os.environ.get('DEBUG', '0') == '0' and os.path.exists('/local_settings.py'): LOCAL_SETTINGS_PATH = '/local_settings.py' +else: + LOCAL_SETTINGS_PATH = os.path.join(os.path.dirname(__file__), 'local_settings.py') try: with open(LOCAL_SETTINGS_PATH) as f: exec(f.read(), globals())