Skip to content

Commit

Permalink
Merge pull request getredash#1701 from akiray03/refactor-next-to-next…
Browse files Browse the repository at this point in the history
…_path

Change: rename local variable `next` to `next_path`
  • Loading branch information
arikfr authored Apr 2, 2017
2 parents 0cf4db1 + 0dc98e8 commit 5326898
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions redash/authentication/google_oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ def org_login(org_slug):
@blueprint.route('/oauth/google', endpoint="authorize")
def login():
callback = url_for('.callback', _external=True)
next = request.args.get('next', url_for("redash.index", org_slug=session.get('org_slug')))
next_path = request.args.get('next', url_for("redash.index", org_slug=session.get('org_slug')))
logger.debug("Callback url: %s", callback)
logger.debug("Next is: %s", next)
return google_remote_app().authorize(callback=callback, state=next)
logger.debug("Next is: %s", next_path)
return google_remote_app().authorize(callback=callback, state=next_path)


@blueprint.route('/oauth/google_callback', endpoint="callback")
Expand Down Expand Up @@ -118,6 +118,6 @@ def authorized():

create_and_login_user(org, profile['name'], profile['email'])

next = request.args.get('state') or url_for("redash.index", org_slug=org.slug)
next_path = request.args.get('state') or url_for("redash.index", org_slug=org.slug)

return redirect(next)
return redirect(next_path)

0 comments on commit 5326898

Please sign in to comment.