mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-11-25 08:38:59 +00:00
truly fixed the weird bug. requesting / no longer resets session['step']
This commit is contained in:
parent
28ca5c3d83
commit
2cbad2eff3
1 changed files with 7 additions and 1 deletions
8
webui.py
8
webui.py
|
@ -30,7 +30,6 @@ def login_check():
|
|||
@app.route("/")
|
||||
def home():
|
||||
if 'user_id' in session:
|
||||
session['step'] = 1
|
||||
c = mysql.connection.cursor()
|
||||
c.execute("SELECT COUNT(*) FROM `bots` WHERE user_id = %s", (session['user_id'],))
|
||||
bot_count = c.fetchone()[0]
|
||||
|
@ -334,6 +333,9 @@ def bot_accounts_add():
|
|||
else:
|
||||
error = "Couldn't access ActivityPub outbox. {} may require authenticated fetches, which FediBooks doesn't support yet.".format(instance)
|
||||
return render_template("bot_accounts_add.html", error = error)
|
||||
else:
|
||||
# new account add request
|
||||
session['step'] = 1
|
||||
|
||||
return render_template("bot_accounts_add.html", error = session.pop('error', None))
|
||||
|
||||
|
@ -469,6 +471,10 @@ def bot_create():
|
|||
del session['instance_type']
|
||||
del session['client_id']
|
||||
del session['client_secret']
|
||||
else:
|
||||
# user is starting a new bot create request
|
||||
session['step'] = 1
|
||||
|
||||
|
||||
return render_template("bot_create.html", error = session.pop('error', None))
|
||||
|
||||
|
|
Loading…
Reference in a new issue