mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-13 18:31:10 +01:00
Issue #84: If an e-mail template doesn't exist, don't send the e-mail.
As requested (and patch provided by) flywheelnetworks.
This commit is contained in:
parent
4d264eaa28
commit
8d95221000
5
lib.py
5
lib.py
@ -67,7 +67,10 @@ def send_templated_mail(template_name, email_context, recipients, sender=None, b
|
||||
pass
|
||||
|
||||
if not t:
|
||||
t = EmailTemplate.objects.get(template_name__iexact=template_name)
|
||||
try:
|
||||
t = EmailTemplate.objects.get(template_name__iexact=template_name)
|
||||
except EmailTemplate.DoesNotExist:
|
||||
return # just ignore if template doesn't exist
|
||||
|
||||
if not sender:
|
||||
sender = settings.DEFAULT_FROM_EMAIL
|
||||
|
Loading…
Reference in New Issue
Block a user