diff --git a/model.py b/model.py index e9a0905..11a2b4e 100644 --- a/model.py +++ b/model.py @@ -189,7 +189,7 @@ class Session(db.Model, TimestampMixin): __tablename__ = 'sessions' id = db.Column(db.String, primary_key=True, - default=lambda: secrets.token_urlsafe()) + default=secrets.token_urlsafe) account_id = db.Column( db.String, @@ -199,7 +199,7 @@ class Session(db.Model, TimestampMixin): account = db.relationship(Account, lazy='joined', backref='sessions') csrf_token = db.Column(db.String, - default=lambda: secrets.token_urlsafe(), + default=secrets.token_urlsafe, nullable=False)