NYCPython / wheretomeetup

Connecting Meetup organizers with hosts and sponsors.
http://www.wheretomeetup.com
BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

Attempting to log in when already logged in gives an exception #34

Closed dcrosta closed 12 years ago

dcrosta commented 12 years ago

Easy to reproduce:

  1. Log in with Meetup
  2. Go to http://www.wheretomeetup.com/login/, and grant access again

Expected:

  1. You should not receive a traceback

Expected better behavior:

  1. We should not send you through Meetup if you are already logged in

Actual:

  1. Receive traceback:
Traceback (most recent call last):
  File "/Users/dcrosta/.virtualenvs/wheretomeetup/lib/python2.7/site-packages/flask/app.py", line 1701, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/dcrosta/.virtualenvs/wheretomeetup/lib/python2.7/site-packages/flask/app.py", line 1689, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/Users/dcrosta/.virtualenvs/wheretomeetup/lib/python2.7/site-packages/flask/app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/dcrosta/.virtualenvs/wheretomeetup/lib/python2.7/site-packages/flask/app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/dcrosta/.virtualenvs/wheretomeetup/lib/python2.7/site-packages/flask/app.py", line 1358, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/dcrosta/.virtualenvs/wheretomeetup/lib/python2.7/site-packages/flask/app.py", line 1344, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/dcrosta/.virtualenvs/wheretomeetup/lib/python2.7/site-packages/flaskext/oauth.py", line 382, in decorated
    return f(*((data,) + args), **kwargs)
  File "/Users/dcrosta/src/wheretomeetup/meetups/views.py", line 42, in login_meetup_return
    oauth_response['oauth_token'],
KeyError: 'oauth_token'