Closed
Description
I had a custom authenticator that was misconfigured, and it tried to import a settings.SOME_NAME
when SOME_NAME
did not exist in my settings module. This caused an AttributeError, so when the APIView tried to authenticate and called request.user
, the Python property call swallowed this error, and gave me a "'WSGIRequest' object has no attribute 'successful_authenticator'" error instead, masking the real issue in my code.
I've got a pull request that demos this issue. It seems to happen on bad module references. I don't have a good solution, but maybe not having an authentication side effect inside a property definition might do the trick.
I'm happy to take a stab at a solution, but could use some guidance!
Pull Request: #1938