From e348c8d21e6e4e226f33cb47fd1dff5ebf7799ef Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 27 Nov 2015 11:36:42 +0100 Subject: [PATCH] Change db session handling. --- accountant/api/models/users.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accountant/api/models/users.py b/accountant/api/models/users.py index 51a495c..5812163 100644 --- a/accountant/api/models/users.py +++ b/accountant/api/models/users.py @@ -40,8 +40,8 @@ class User(UserMixin, db.Model): return self.active @classmethod - def query(cls, session): - return session.query(cls) + def query(cls): + return db.session.query(cls) @classmethod def hash_password(cls, password):