forked from extern/django-helpdesk
fixed email sending when no locale is specified in queue
This commit is contained in:
parent
c4fa11719f
commit
70a2cd9271
@ -56,9 +56,11 @@ def send_templated_mail(template_name, email_context, recipients, sender=None, b
|
||||
context = Context(email_context)
|
||||
locale = 'en';
|
||||
if hasattr(context['queue'], 'locale'):
|
||||
locale = getattr(context['queue'], 'locale', 'en')
|
||||
locale = getattr(context['queue'], 'locale', '')
|
||||
else:
|
||||
locale = context['queue'].get('locale', 'en')
|
||||
if not locale:
|
||||
locale = 'en'
|
||||
|
||||
t = None
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user