check if mail is enabled

This commit is contained in:
Matthias 2021-10-07 14:24:20 +02:00
parent a6c6b5c248
commit f89dd84daf
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -257,7 +257,7 @@ class RegistratonMixin:
Mixin to check if registration should be enabled
"""
def is_open_for_signup(self, request):
if InvenTreeSetting.get_setting('LOGIN_ENABLE_REG', True):
if InvenTreeSetting.get_setting('EMAIL_HOST', None) and InvenTreeSetting.get_setting('LOGIN_ENABLE_REG', True):
return super().is_open_for_signup(request)
return False