stages/authenticator_totp: fix error when disabling device
This commit is contained in:
parent
c275992f7b
commit
b968adffc1
|
@ -29,7 +29,8 @@ class UserSettingsView(LoginRequiredMixin, TemplateView):
|
||||||
class DisableView(LoginRequiredMixin, View):
|
class DisableView(LoginRequiredMixin, View):
|
||||||
"""Disable TOTP for user"""
|
"""Disable TOTP for user"""
|
||||||
|
|
||||||
def get(self, request: HttpRequest) -> HttpResponse:
|
# pylint: disable=unused-argument
|
||||||
|
def get(self, request: HttpRequest, **kwargs) -> HttpResponse:
|
||||||
"""Delete all the devices for user"""
|
"""Delete all the devices for user"""
|
||||||
totp = TOTPDevice.objects.filter(user=request.user, confirmed=True)
|
totp = TOTPDevice.objects.filter(user=request.user, confirmed=True)
|
||||||
totp.delete()
|
totp.delete()
|
||||||
|
|
Reference in New Issue