PEP fixes

This commit is contained in:
Matthias 2021-11-01 00:16:30 +01:00
parent b5fb67ee76
commit b7d6ca12e8
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076
2 changed files with 2 additions and 2 deletions

View File

@ -155,6 +155,7 @@ class QueryCountMiddleware(object):
url_matcher = url('', include(frontendpatterns)) url_matcher = url('', include(frontendpatterns))
class Check2FAMiddleware(BaseRequire2FAMiddleware): class Check2FAMiddleware(BaseRequire2FAMiddleware):
"""check if user is required to have MFA enabled""" """check if user is required to have MFA enabled"""
def require_2fa(self, request): def require_2fa(self, request):
@ -166,6 +167,7 @@ class Check2FAMiddleware(BaseRequire2FAMiddleware):
pass pass
return False return False
class CustomAllauthTwoFactorMiddleware(AllauthTwoFactorMiddleware): class CustomAllauthTwoFactorMiddleware(AllauthTwoFactorMiddleware):
"""This function ensures only frontend code triggers the MFA auth cycle""" """This function ensures only frontend code triggers the MFA auth cycle"""
def process_request(self, request): def process_request(self, request):

View File

@ -29,7 +29,6 @@ from allauth.socialaccount.forms import DisconnectForm
from allauth.account.models import EmailAddress from allauth.account.models import EmailAddress
from allauth.account.views import EmailView, PasswordResetFromKeyView from allauth.account.views import EmailView, PasswordResetFromKeyView
from allauth.socialaccount.views import ConnectionsView from allauth.socialaccount.views import ConnectionsView
from allauth_2fa.views import TwoFactorAuthenticate
from common.settings import currency_code_default, currency_codes from common.settings import currency_code_default, currency_codes
@ -778,7 +777,6 @@ class CustomPasswordResetFromKeyView(PasswordResetFromKeyView):
success_url = reverse_lazy("account_login") success_url = reverse_lazy("account_login")
class CurrencyRefreshView(RedirectView): class CurrencyRefreshView(RedirectView):
""" """
POST endpoint to refresh / update exchange rates POST endpoint to refresh / update exchange rates