removed the hack, as it doesn't seem to work anyway
This commit is contained in:
parent
16d80fcd73
commit
633407ca9d
1 changed files with 6 additions and 10 deletions
16
web.py
16
web.py
|
@ -192,18 +192,14 @@ def do_login():
|
|||
def create_password():
|
||||
db, c, dc = db_reconnect()
|
||||
c.execute("SELECT COUNT(*) FROM data WHERE username = %s AND instance = %s", (session['username'], session['instance']))
|
||||
try: #TODO: this is a disgusting hack, REMOVE IT
|
||||
if c.fetchone()[0] == 0:
|
||||
db.close()
|
||||
return render_template("create_password.html", bg = "background-image:url('{}')".format(session['avi']))
|
||||
else:
|
||||
#user already exists in database, so they already have a password
|
||||
db.close()
|
||||
return redirect(url_for('main'))
|
||||
except:
|
||||
if c.fetchone()[0] == 0:
|
||||
db.close()
|
||||
return render_template("create_password.html", bg = "background-image:url('{}')".format(session['avi']))
|
||||
|
||||
else:
|
||||
#user already exists in database, so they already have a password
|
||||
db.close()
|
||||
return redirect(url_for('main'))
|
||||
|
||||
@app.route('/internal/create_account', methods=['POST'])
|
||||
def create_account():
|
||||
db, c, dc = db_reconnect()
|
||||
|
|
Loading…
Reference in a new issue