Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
Fix error in throttling when request.user is None#8370
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Fix error in throttling when request.user is None#8370
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Check to see if request.user is set before proceeding with furtherauthentication checks.
shredding commentedApr 21, 2022
This affects me as well. Is there a chance to merge that soon? |
alexgutjahr commentedApr 21, 2022
+1 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Normally you'd expect an |
Check to see if request.user is set before proceeding with furtherauthentication checks.
While trying to remove the Django authentication module, I've ran into an error when using the configuration below.
Specifically, an
AttributeError
is raised because DRF does not expect the user to beNone
.This PR fixes the issue by checking if
request.user
is set before proceeding with further authentication checks.The test suite and pre-commit hooks are passing. If needed, I'll be happy to write a test-case for this.
As this is my first contribution to DRF please let me know in case I am missing any contribution guidelines. I'd like for the process to be as seamless as possible.
Thank you for your time and consideration.