Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Correct user condition
Browse files Browse the repository at this point in the history
  • Loading branch information
bensteinberg committed Jan 24, 2024
1 parent 6caa3d0 commit aaa250b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion capstone/capapi/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def middleware(request):
datetime.now().isoformat(),
request.META.get('HTTP_CF_CONNECTING_IP'),
request.path,
request.user.email if request.user.is_authenticated else None,
request.user.email if hasattr(request, 'user') and request.user.is_authenticated else None,
request.META.get('HTTP_USER_AGENT'),
request.META.get('HTTP_REFERER'),
]
Expand Down

0 comments on commit aaa250b

Please sign in to comment.