From 75a72fb18231b8be4baab37555f65ccf05ac5933 Mon Sep 17 00:00:00 2001 From: feng626 <1304903146@qq.com> Date: Thu, 16 Jun 2022 11:28:34 +0800 Subject: [PATCH] fix: user confirm bug --- apps/authentication/api/confirm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/authentication/api/confirm.py b/apps/authentication/api/confirm.py index c77a1d533..9041f6e85 100644 --- a/apps/authentication/api/confirm.py +++ b/apps/authentication/api/confirm.py @@ -22,7 +22,7 @@ class ConfirmViewSet(ListCreateAPIView): def check(self, confirm_type: str): if confirm_type == ConfirmType.MFA: - return bool(MFAOtp(self.user).is_active()) + return self.user.mfa_enabled if confirm_type == ConfirmType.PASSWORD: return self.user.is_password_authenticate()