Merge pull request #2173 from matmair/fix-provider-signup

fix signup with providers with extra args
This commit is contained in:
Oliver 2021-10-16 12:35:22 +11:00 committed by GitHub
commit 1695eb98ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -260,9 +260,9 @@ class RegistratonMixin:
"""
Mixin to check if registration should be enabled
"""
def is_open_for_signup(self, request):
def is_open_for_signup(self, request, *args, **kwargs):
if settings.EMAIL_HOST and InvenTreeSetting.get_setting('LOGIN_ENABLE_REG', True):
return super().is_open_for_signup(request)
return super().is_open_for_signup(request, *args, **kwargs)
return False
def save_user(self, request, user, form, commit=True):