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
@classmethod
def query(cls, session):
return session.query(cls)
def query(cls):
return db.session.query(cls)
@classmethod
def hash_password(cls, password):