remove unnecessary lambdas

This commit is contained in:
codl 2017-08-29 15:17:47 +02:00
parent f9a6bfe260
commit b231ea7c00
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 2 additions and 2 deletions

View File

@ -189,7 +189,7 @@ class Session(db.Model, TimestampMixin):
__tablename__ = 'sessions' __tablename__ = 'sessions'
id = db.Column(db.String, primary_key=True, id = db.Column(db.String, primary_key=True,
default=lambda: secrets.token_urlsafe()) default=secrets.token_urlsafe)
account_id = db.Column( account_id = db.Column(
db.String, db.String,
@ -199,7 +199,7 @@ class Session(db.Model, TimestampMixin):
account = db.relationship(Account, lazy='joined', backref='sessions') account = db.relationship(Account, lazy='joined', backref='sessions')
csrf_token = db.Column(db.String, csrf_token = db.Column(db.String,
default=lambda: secrets.token_urlsafe(), default=secrets.token_urlsafe,
nullable=False) nullable=False)