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):