diff --git a/src/pretix/settings.py b/src/pretix/settings.py index b325757f2..14139bfe4 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: