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
|
||||
|
||||
@classmethod
|
||||
def query(cls, session):
|
||||
return session.query(cls)
|
||||
def query(cls):
|
||||
return db.session.query(cls)
|
||||
|
||||
@classmethod
|
||||
def hash_password(cls, password):
|
||||
|
Loading…
Reference in New Issue
Block a user