8000 Fixed middleware setting fallback in compatibility function. Take 2 · django-cms/django-cms@8003cd2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8003cd2

Browse files
committed
Fixed middleware setting fallback in compatibility function. Take 2
1 parent 3b43feb commit 8003cd2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cms/utils/compat/dj.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ def get_apps():
3030

3131

3232
def get_middleware():
33-
# order is important.
34-
# django sets MIDDLEWARE to None which prevents MIDDLEWARE_CLASSES from being used.
35-
return getattr(settings, 'MIDDLEWARE_CLASSES', getattr(settings, 'MIDDLEWARE'))
33+
if getattr(settings, 'MIDDLEWARE', None) is None:
34+
return settings.MIDDLEWARE_CLASSES
35+
return settings.MIDDLEWARE

0 commit comments

Comments
 (0)
0