Merge "Fix middleware to not access session fields without user auth"
This commit is contained in:
commit
7e7965f875
@ -46,6 +46,7 @@ class HorizonMiddleware(object):
|
||||
|
||||
def process_request(self, request):
|
||||
""" Adds data necessary for Horizon to function to the request. """
|
||||
if hasattr(request, "user") and request.user.is_authenticated():
|
||||
# Activate timezone handling
|
||||
tz = request.session.get('django_timezone')
|
||||
if tz:
|
||||
|
Loading…
x
Reference in New Issue
Block a user