diff options
| author | Georgios Andreadis <G.Andreadis@student.tudelft.nl> | 2017-08-10 09:40:26 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-10 09:40:26 +0300 |
| commit | bc70e6ae115beb469541c12014ffdecc01a1e50c (patch) | |
| tree | 935c2ef5b1621b0e13ec76f2ca02f6912940d690 /opendc/models/user.py | |
| parent | 5d42f30ed30aa5b6970304569c6bd01c16078759 (diff) | |
| parent | 54617bf3268c27d63a40844216760a49f28d39e0 (diff) | |
Merge pull request #9 from atlarge-research/mariadb
Migration to MariaDB
Diffstat (limited to 'opendc/models/user.py')
| -rw-r--r-- | opendc/models/user.py | 4 |
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 |
