Skip to content

Commit

Permalink
Fix typo (#8757)
Browse files Browse the repository at this point in the history
- registraton -> registration
  • Loading branch information
SchrodingersGat authored Dec 24, 2024
1 parent fe68dc7 commit c79fc28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/backend/InvenTree/InvenTree/auth_overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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."""

Expand All @@ -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."""

Expand Down
6 changes: 3 additions & 3 deletions src/backend/InvenTree/InvenTree/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""


Expand Down

0 comments on commit c79fc28

Please sign in to comment.