From 50d82143bccbffaae75edf9b8719526b13925432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicole=20Kl=C3=BCnder?= Date: Mon, 7 Nov 2016 19:53:15 +0100 Subject: [PATCH] do not overwrite SESSION_ENGINE if it is already set (#235) --- src/pretix/settings.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pretix/settings.py b/src/pretix/settings.py index b325757f26..14139bfe49 100644 --- a/src/pretix/settings.py +++ b/src/pretix/settings.py @@ -122,10 +122,11 @@ if HAS_REDIS: SESSION_ENGINE = "django.contrib.sessions.backends.cache" SESSION_CACHE_ALIAS = "redis" -if not SESSION_ENGINE and REAL_CACHE_USED: - SESSION_ENGINE = "django.contrib.sessions.backends.cached_db" -else: - SESSION_ENGINE = "django.contrib.sessions.backends.db" +if not SESSION_ENGINE: + if REAL_CACHE_USED: + SESSION_ENGINE = "django.contrib.sessions.backends.cached_db" + else: + SESSION_ENGINE = "django.contrib.sessions.backends.db" HAS_CELERY = config.has_option('celery', 'broker') if HAS_CELERY: