From 777cb36dfb130af38fe095de6140b4a08883570d Mon Sep 17 00:00:00 2001 From: Sacheendra Talluri Date: Wed, 9 Aug 2017 00:20:54 +0200 Subject: Migrate to MariaDB --- opendc/models/user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'opendc/models/user.py') 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 -- cgit v1.2.3