stages/authenticator_totp: fix error when disabling device

This commit is contained in:
Jens Langhammer 2021-02-25 20:59:43 +01:00
parent c275992f7b
commit b968adffc1

View file

@ -29,7 +29,8 @@ class UserSettingsView(LoginRequiredMixin, TemplateView):
class DisableView(LoginRequiredMixin, View):
"""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"""
totp = TOTPDevice.objects.filter(user=request.user, confirmed=True)
totp.delete()