Commit 03635691 authored by Daniel Klaffenbach's avatar Daniel Klaffenbach 🐍

middleware: Drop support for unsupported Django versions

parent 89640e29
Pipeline #27501 passed with stage
in 45 seconds
......@@ -3,10 +3,11 @@ from __future__ import unicode_literals
from django.utils.deprecation import MiddlewareMixin
from . import _thread_local_storage
class ModelJournalMiddleware(MiddlewareMixin):
def process_request(self, request):
username = ''
if hasattr(request, 'user') and request.user.is_authenticated():
if hasattr(request, 'user') and request.user.is_authenticated:
user = request.user
username = getattr(user, user.USERNAME_FIELD)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment