Commit 007c5453 authored by okhin's avatar okhin 🚴

Fixing the syntax for the SQLite statement

parent 3c091153
...@@ -465,7 +465,7 @@ def static_files(filepath): ...@@ -465,7 +465,7 @@ def static_files(filepath):
def login_admin(user, password): def login_admin(user, password):
db = sqlite3.connect(config['piphone']['db']) db = sqlite3.connect(config['piphone']['db'])
user = db.execute('SELECT api, token, admin FROM users where api = ?', user) user = db.execute('SELECT api, token, admin FROM users where api = ?', (user,))
user = user.fetchone() user = user.fetchone()
if user is None: if user is None:
# user does not exist # user does not exist
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment