Fixes bug where impersonating user isn't properly logged when MAX_DURATION
timeout occurs.

Thanks to Matt Klein for the bug report.
1 files changed, 1 insertions(+), 1 deletions(-)

M impersonate/views.py
M impersonate/views.py +1 -1
@@ 88,7 88,7 @@ def stop_impersonate(request):
     if impersonating is not None:
         session_end.send(
             sender=None,
-            impersonator=request.impersonator,
+            impersonator=request.impersonator or request.user,
             impersonating=impersonating,
             request=request,
         )