Change db session handling.
This commit is contained in:
parent
9d6286314d
commit
e348c8d21e
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user