added gross hack
This commit is contained in:
parent
068306944c
commit
0dd8efccff
1 changed files with 9 additions and 5 deletions
4
web.py
4
web.py
|
@ -190,6 +190,7 @@ 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']))
|
||||
|
@ -197,6 +198,9 @@ def create_password():
|
|||
#user already exists in database, so they already have a password
|
||||
db.close()
|
||||
return redirect(url_for('main'))
|
||||
except:
|
||||
db.close()
|
||||
return render_template("create_password.html", bg = "background-image:url('{}')".format(session['avi']))
|
||||
|
||||
@app.route('/internal/create_account', methods=['POST'])
|
||||
def create_account():
|
||||
|
|
Loading…
Reference in a new issue