Skip to content

Commit

Permalink
Make REMOTE_ADDR optional
Browse files Browse the repository at this point in the history
Resolves soynatan#263
  • Loading branch information
samamorgan committed Feb 5, 2024
1 parent 9e04815 commit 0e4350d
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 0e4350d

Please sign in to comment.