fix: 修复重置 mfa 的提示问题

pull/7285/head
ibuler 2021-11-25 17:47:18 +08:00 committed by 老广
parent 7e793a6e0a
commit d401a44317
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ class UserResetMFAApi(UserQuerysetMixin, generics.RetrieveAPIView):
user = self.get_object() if kwargs.get('pk') else request.user user = self.get_object() if kwargs.get('pk') else request.user
if user == request.user: if user == request.user:
msg = _("Could not reset self otp, use profile reset instead") 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 backends = user.active_mfa_backends_mapper
for backend in backends.values(): for backend in backends.values():