From c79fc281fde5a7da7b2bb6750eec3687dbb81626 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 25 Dec 2024 07:38:39 +1100 Subject: [PATCH] Fix typo (#8757) - registraton -> registration --- src/backend/InvenTree/InvenTree/auth_overrides.py | 6 +++--- src/backend/InvenTree/InvenTree/test_auth.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/backend/InvenTree/InvenTree/auth_overrides.py b/src/backend/InvenTree/InvenTree/auth_overrides.py index d46097665fb4..3fb92f5a742f 100644 --- a/src/backend/InvenTree/InvenTree/auth_overrides.py +++ b/src/backend/InvenTree/InvenTree/auth_overrides.py @@ -117,7 +117,7 @@ def registration_enabled(): return False -class RegistratonMixin: +class RegistrationMixin: """Mixin to check if registration should be enabled.""" def is_open_for_signup(self, request, *args, **kwargs): @@ -188,7 +188,7 @@ def get_email_confirmation_url(self, request, emailconfirmation): class CustomAccountAdapter( - CustomUrlMixin, RegistratonMixin, OTPAdapter, DefaultAccountAdapter + CustomUrlMixin, RegistrationMixin, OTPAdapter, DefaultAccountAdapter ): """Override of adapter to use dynamic settings.""" @@ -215,7 +215,7 @@ def get_email_confirmation_url(self, request, emailconfirmation): class CustomSocialAccountAdapter( - CustomUrlMixin, RegistratonMixin, DefaultSocialAccountAdapter + CustomUrlMixin, RegistrationMixin, DefaultSocialAccountAdapter ): """Override of adapter to use dynamic settings.""" diff --git a/src/backend/InvenTree/InvenTree/test_auth.py b/src/backend/InvenTree/InvenTree/test_auth.py index bc279fe4a887..10aa5c3e0951 100644 --- a/src/backend/InvenTree/InvenTree/test_auth.py +++ b/src/backend/InvenTree/InvenTree/test_auth.py @@ -10,19 +10,19 @@ from common.models import InvenTreeSetting from InvenTree import sso -from InvenTree.auth_overrides import RegistratonMixin +from InvenTree.auth_overrides import RegistrationMixin from InvenTree.unit_test import InvenTreeAPITestCase class Dummy: - """Simulate super class of RegistratonMixin.""" + """Simulate super class of RegistrationMixin.""" def save_user(self, _request, user: User, *args) -> User: """This method is only used that the super() call of RegistrationMixin does not fail.""" return user -class MockRegistrationMixin(RegistratonMixin, Dummy): +class MockRegistrationMixin(RegistrationMixin, Dummy): """Mocked implementation of the RegistrationMixin."""