summaryrefslogtreecommitdiff
path: root/opendc/models/user.py
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-08-13 23:17:50 +0300
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-08-13 23:17:50 +0300
commit3d086d18a2639a76c4739b6ca7ca06416356c706 (patch)
tree5c9e122ae7e84b8013e8a742714a5779f871f6ad /opendc/models/user.py
parentf589682b0840aab0624122052eb863cf8dc3a0b9 (diff)
parentbc70e6ae115beb469541c12014ffdecc01a1e50c (diff)
Merge branch 'master' into flat-api
Diffstat (limited to 'opendc/models/user.py')
-rw-r--r--opendc/models/user.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/opendc/models/user.py b/opendc/models/user.py
index 9c716470..885170d0 100644
--- a/opendc/models/user.py
+++ b/opendc/models/user.py
@@ -22,7 +22,7 @@ class User(Model):
def from_google_id(cls, google_id):
"""Initialize a User by fetching them by their google id."""
- user = cls._from_database('SELECT * FROM users WHERE google_id = ?', (google_id,))
+ user = cls._from_database('SELECT * FROM users WHERE google_id = %s', (google_id,))
if user is not None:
return user
@@ -33,7 +33,7 @@ class User(Model):
def from_email(cls, email):
"""Initialize a User by fetching them by their email."""
- user = cls._from_database('SELECT * FROM users WHERE email = ?', (email,))
+ user = cls._from_database('SELECT * FROM users WHERE email = %s', (email,))
if user is not None:
return user