Commit 5cc5771f authored by okhin's avatar okhin 🚴

SQLITE does not play well with booleans

parent ccfcd75b
Pipeline #785 passed with stage
in 11 seconds
...@@ -506,7 +506,7 @@ def little_admin(db): ...@@ -506,7 +506,7 @@ def little_admin(db):
# We need to check if we're admin # We need to check if we're admin
admin = db.execute('SELECT admin FROM users WHERE api = ?', (request.params['api'],)); admin = db.execute('SELECT admin FROM users WHERE api = ?', (request.params['api'],));
admin = admin.fetchall() admin = admin.fetchall()
if admin[0] is not True: if admin[0] != 1;
abort(403, "You need to have an admin access") abort(403, "You need to have an admin access")
users = db.execute('SELECT api, token, admin FROM users').fetchall() users = db.execute('SELECT api, token, admin FROM users').fetchall()
return template('index', users=users) return template('index', users=users)
......
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