Skip to content

Commit

Permalink
Possibly fixed an UnboundLocalError when OAuth token has become invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
sebtesobe committed Jun 11, 2017
1 parent 4c908e0 commit 4d02a6a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apimanager/oauth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def get_redirect_url(self, *args, **kwargs):
try:
response = session.fetch_access_token(url)
except TokenRequestDenied as err:
response = {}
messages.error(self.request, err)

self.request.session['oauth_token'] = response.get('oauth_token')
Expand Down

0 comments on commit 4d02a6a

Please sign in to comment.