From 62cbca7eb276a3c3341a316e5ce5e749e5a8230d Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 25 Nov 2021 17:47:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=87=8D=E7=BD=AE=20m?= =?UTF-8?q?fa=20=E7=9A=84=E6=8F=90=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/users/api/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/users/api/user.py b/apps/users/api/user.py index a08e68981..ad003ad21 100644 --- a/apps/users/api/user.py +++ b/apps/users/api/user.py @@ -207,7 +207,7 @@ class UserResetMFAApi(UserQuerysetMixin, generics.RetrieveAPIView): user = self.get_object() if kwargs.get('pk') else request.user if user == request.user: msg = _("Could not reset self otp, use profile reset instead") - return Response({"error": msg}, status=401) + return Response({"error": msg}, status=400) backends = user.active_mfa_backends_mapper for backend in backends.values():