Skip to content

Commit

Permalink
Make REMOTE_ADDR optional
Browse files Browse the repository at this point in the history
Resolves #263
  • Loading branch information
samamorgan authored and jheld committed Mar 8, 2024
1 parent 9e04815 commit eca99cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion easyaudit/signals/auth_signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def user_logged_in(sender, request, user, **kwargs):
'login_type': LoginEvent.LOGIN,
'username': getattr(user, user.USERNAME_FIELD),
'user_id': getattr(user, 'id', None),
'remote_ip': request.META[REMOTE_ADDR_HEADER]
'remote_ip': request.META.get(REMOTE_ADDR_HEADER, "")
})
except Exception:
if should_propagate_exceptions():
Expand Down

0 comments on commit eca99cf

Please sign in to comment.