mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 07:53:19 +01:00
Added a warning if no message notification template found in database
This commit is contained in:
parent
89cc11cb8e
commit
7b594cfdc0
@ -17,6 +17,9 @@ try:
|
||||
except ImportError:
|
||||
from base64 import decodestring as b64decode
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger('helpdesk')
|
||||
|
||||
from django.utils.encoding import smart_str
|
||||
|
||||
def send_templated_mail(template_name, email_context, recipients, sender=None, bcc=None, fail_silently=False, files=None):
|
||||
@ -66,6 +69,8 @@ def send_templated_mail(template_name, email_context, recipients, sender=None, b
|
||||
try:
|
||||
t = EmailTemplate.objects.get(template_name__iexact=template_name, locale__isnull=True)
|
||||
except EmailTemplate.DoesNotExist:
|
||||
logger.warning('template "%s" does not exist, no mail sent' %
|
||||
template_name)
|
||||
return # just ignore if template doesn't exist
|
||||
|
||||
if not sender:
|
||||
|
Loading…
Reference in New Issue
Block a user