Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
piphone
piphone-sip
Commits
5cc5771f
Commit
5cc5771f
authored
Jan 24, 2017
by
okhin
Browse files
SQLITE does not play well with booleans
parent
ccfcd75b
Pipeline
#785
passed with stage
in 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
piphone.py
View file @
5cc5771f
...
...
@@ -506,7 +506,7 @@ def little_admin(db):
# We need to check if we're admin
admin
=
db
.
execute
(
'SELECT admin FROM users WHERE api = ?'
,
(
request
.
params
[
'api'
],));
admin
=
admin
.
fetchall
()
if
admin
[
0
]
is
not
True
:
if
admin
[
0
]
!=
1
;
abort
(
403
,
"You need to have an admin access"
)
users
=
db
.
execute
(
'SELECT api, token, admin FROM users'
).
fetchall
()
return
template
(
'index'
,
users
=
users
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment