conn.close() if mru_token update can't .commit()
This commit is contained in:
parent
08ae3d2b7f
commit
b0df35eba0
1 changed files with 2 additions and 0 deletions
|
@ -576,7 +576,9 @@ def set_mru_totp_code(email, token, env):
|
|||
c.execute('UPDATE totp_credentials SET mru_token=? WHERE user_email=?', (token, email))
|
||||
|
||||
if c.rowcount != 1:
|
||||
conn.close()
|
||||
raise ValueError("That's not a user (%s)." % email)
|
||||
|
||||
conn.commit()
|
||||
return "OK"
|
||||
|
||||
|
|
Loading…
Reference in a new issue