From f89dd84daff70761986b251cb6daf40da1647c1b Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 7 Oct 2021 14:24:20 +0200 Subject: [PATCH] check if mail is enabled --- InvenTree/InvenTree/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/forms.py b/InvenTree/InvenTree/forms.py index 809f126069..47d33e621d 100644 --- a/InvenTree/InvenTree/forms.py +++ b/InvenTree/InvenTree/forms.py @@ -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