APIClient put() with follow=True gives AttributeError for 302 redirects #8695
Unanswered
juspence
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Similar to #8406, but for APIClient instead of APITestCase, and the redirect is just a basic 302 instead of 307 / 308. Below is the traceback I see when running "tox -e test -- tests/test_api.py::test_putting_data":
The Response object here that raises this error is of type "rest_framework.response.Response". So I think it's a bug in Django-REST-Framework's APIClient, and not the underlying Django Client class that DRF inherits. I guess there's some issue with the inheritance / object patching which means the url property doesn't get defined?
Beta Was this translation helpful? Give feedback.
All reactions