-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make REMOTE_ADDR optional #263
Comments
@jheld Let me know what you think please. Happy to create a PR for this. The alternative would be to disable auth events to be watched in tests but it would be nice to stay as close as possible to production. |
Should any extra conceptual weirdness be at play here by making this change, it's evading me at this time. Given the examples you've shown in the code where it certainly allows |
Resolves soynatan#263
The
user_logged_in
signal handler fails during tests when callingclient.force_login(...)
because the request has no IP (REMOTE_ADDR
).Would it be ok to change this to
request.META.get(REMOTE_ADDR_HEADER)
?remote_ip
is already nullable so from theLoginEvent
model perspective it is already supported. And the request signal handler already supports this:django-easy-audit/easyaudit/signals/request_signals.py
Line 44 in bbdf834
The text was updated successfully, but these errors were encountered: