diff --git a/easyaudit/signals/auth_signals.py b/easyaudit/signals/auth_signals.py index 4c79c7c..ca3676b 100644 --- a/easyaudit/signals/auth_signals.py +++ b/easyaudit/signals/auth_signals.py @@ -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():