From 8d2e03d591991643c76cee08c781f11c4649c829 Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Wed, 5 Aug 2026 23:18:12 +0800 Subject: [PATCH] fix: keep password unchanged when sending reset link --- apps/users/api/profile.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/apps/users/api/profile.py b/apps/users/api/profile.py index 0ea8c1baa..8bf1e0d28 100644 --- a/apps/users/api/profile.py +++ b/apps/users/api/profile.py @@ -1,6 +1,4 @@ # ~*~ coding: utf-8 ~*~ -import uuid - from rest_framework import generics from rest_framework.permissions import IsAuthenticated @@ -27,11 +25,7 @@ class UserResetPasswordApi(UserQuerysetMixin, generics.UpdateAPIView): serializer_class = serializers.UserSerializer def perform_update(self, serializer): - # Note: we are not updating the user object here. - # We just do the reset-password stuff. user = self.get_object() - user.password_raw = str(uuid.uuid4()) - user.save() ResetPasswordMsg(user).publish_async()