Merge "operation_log: Fix logout generating AttributeError"
This commit is contained in:
commit
f0c03afa25
|
@ -111,8 +111,10 @@ class OperationLogMiddleware(object):
|
|||
|
||||
def _get_log_format(self, request):
|
||||
"""Return operation log format."""
|
||||
if not (hasattr(request, 'user') and
|
||||
request.user.is_authenticated()):
|
||||
user = getattr(request, 'user', None)
|
||||
if not user:
|
||||
return
|
||||
if not request.user.is_authenticated():
|
||||
return
|
||||
method = request.method.upper()
|
||||
if not (method in self.target_methods):
|
||||
|
|
Loading…
Reference in New Issue