aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gn_auth/auth/authorisation/users/views.py5
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,