Change db session handling.

This commit is contained in:
Alexis Lahouze 2015-11-27 11:36:42 +01:00
parent 9d6286314d
commit e348c8d21e

View File

@ -40,8 +40,8 @@ class User(UserMixin, db.Model):
return self.active return self.active
@classmethod @classmethod
def query(cls, session): def query(cls):
return session.query(cls) return db.session.query(cls)
@classmethod @classmethod
def hash_password(cls, password): def hash_password(cls, password):