Commits

David Larlet committed dccb76f

Partly revert previous commit, authorize_access wasn't evaluated as a boolean.

Comments (0)

Files changed (1)

oauth_provider/views.py

         if request.session.get('oauth', '') == token.key:
             request.session['oauth'] = ''
             try:
-                if bool(request.POST.get('authorize_access', False)):
+                if int(request.POST.get('authorize_access', 0)):
                     # authorize the token
                     token = oauth_server.authorize_token(token, request.user)
                     # return the token key