Redirect to oauth_start if not logged in.
This commit is contained in:
parent
39f9ba31ed
commit
128d84fce9
|
@ -266,7 +266,10 @@ def article_page(url_title: str) -> str | Response:
|
|||
|
||||
if flask.request.method == "POST":
|
||||
hit_title = flask.request.form["hit"]
|
||||
do_save(from_title, hit_title)
|
||||
try:
|
||||
do_save(from_title, hit_title)
|
||||
except wikidata_oauth.LoginNeeded:
|
||||
return flask.redirect(flask.url_for("start_oauth"))
|
||||
return flask.redirect(
|
||||
flask.url_for("article_page", url_title=url_title, after=hit_title)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue