mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
do not send if not configured
This commit is contained in:
parent
6c0c8bf1b6
commit
9a310bdd5c
@ -266,6 +266,11 @@ class CustomAccountAdapter(RegistratonMixin, DefaultAccountAdapter):
|
||||
"""
|
||||
Override of adapter to use dynamic settings
|
||||
"""
|
||||
def send_mail(self, template_prefix, email, context):
|
||||
"""only send mail if backend configured"""
|
||||
if InvenTreeSetting.get_setting('EMAIL_HOST', None):
|
||||
return super().send_mail(template_prefix, email, context)
|
||||
return False
|
||||
|
||||
|
||||
class CustomSocialAccountAdapter(RegistratonMixin, DefaultSocialAccountAdapter):
|
||||
|
Loading…
Reference in New Issue
Block a user