diff options
author | Frederick Muriuki Muriithi | 2024-08-20 15:20:11 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-08-20 15:21:22 -0500 |
commit | 3b1ebec9c030f18ad424afa252c2ed98e985aad3 (patch) | |
tree | 582c41858f0bd430cb6815ba7dfafb1cf4ae4169 /gn_auth/auth/authorisation | |
parent | 1c2db3df6d8417cb927e0b47774dcdd6397f5469 (diff) | |
download | gn-auth-3b1ebec9c030f18ad424afa252c2ed98e985aad3.tar.gz |
Fix query: Replace any existing token.
Diffstat (limited to 'gn_auth/auth/authorisation')
-rw-r--r-- | gn_auth/auth/authorisation/users/views.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gn_auth/auth/authorisation/users/views.py b/gn_auth/auth/authorisation/users/views.py index 84d7ef0..3083724 100644 --- a/gn_auth/auth/authorisation/users/views.py +++ b/gn_auth/auth/authorisation/users/views.py @@ -385,10 +385,9 @@ def send_forgot_password_email(conn, user: User): with db.cursor(conn) as cursor: cursor.execute( - ("INSERT INTO " + ("INSERT OR REPLACE INTO " "forgot_password_tokens(user_id, token, generated, expires) " - "VALUES (:user_id, :token, :generated, :expires) " - "ON CONFLICT (user_id) REPLACE"), + "VALUES (:user_id, :token, :generated, :expires)"), { "user_id": str(user.user_id), "token": token, |