This commit is contained in:
Christophe Duvernois 2017-06-08 17:12:45 +00:00 committed by GitHub
commit 5e04830694

View File

@ -167,7 +167,7 @@ class APIView(View):
If request is not permitted, determine what kind of exception to raise. If request is not permitted, determine what kind of exception to raise.
""" """
if request.authenticators and not request.successful_authenticator: if request.authenticators and not request.successful_authenticator:
raise exceptions.NotAuthenticated() raise exceptions.NotAuthenticated(detail=message)
raise exceptions.PermissionDenied(detail=message) raise exceptions.PermissionDenied(detail=message)
def throttled(self, request, wait): def throttled(self, request, wait):