fixed get_email management command

This commit is contained in:
maccesch 2011-09-05 18:42:41 +02:00
parent 652f847c3b
commit c4fa11719f

View File

@ -54,7 +54,11 @@ def send_templated_mail(template_name, email_context, recipients, sender=None, b
import os
context = Context(email_context)
locale = context['queue'].get('locale', 'en')
locale = 'en';
if hasattr(context['queue'], 'locale'):
locale = getattr(context['queue'], 'locale', 'en')
else:
locale = context['queue'].get('locale', 'en')
t = None
try: