mirror of https://github.com/JohnHammond/CTFd.git
Run format
parent
e99f4f11a5
commit
232a4468b0
|
@ -26,9 +26,7 @@ def generate_user_token(user, expiration=None):
|
|||
value = hexencode(os.urandom(32))
|
||||
temp_token = UserTokens.query.filter_by(value=value).first()
|
||||
|
||||
token = UserTokens(
|
||||
user_id=user.id, expiration=expiration, value=value
|
||||
)
|
||||
token = UserTokens(user_id=user.id, expiration=expiration, value=value)
|
||||
db.session.add(token)
|
||||
db.session.commit()
|
||||
return token
|
||||
|
|
Loading…
Reference in New Issue