actually keep track of the last avi update

This commit is contained in:
Lynne Megido 2018-11-13 00:30:36 +10:00
parent d56f036425
commit 038f8bc32a
Signed by: lynnesbian
GPG key ID: FB7B970303ACE499

1
web.py
View file

@ -80,6 +80,7 @@ def home():
c.execute("UPDATE data SET avi = %s, ccavi = %s WHERE client_id LIKE %s AND instance LIKE %s", (session['avi'], session['ccavi'], session['client_id'], session['instance']))
else:
c.execute("UPDATE data SET avi = %s WHERE client_id LIKE %s AND instance LIKE %s", (session['avi'], session['client_id'], session['instance']))
session['last_avi_update'] = int(time.time())
return render_template("home.html", mabg="background-image:url('{}')".format(session['avi']), ccbg="background-image:url('{}')".format(session['ccavi']))
else:
return redirect(url_for('main'))