From: hernani Date: Wed, 14 Apr 2010 16:34:28 +0000 (+0000) Subject: fix in email sender, it was aplitting the attachments, or creating multiple, don... X-Git-Tag: live~1041 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/77c34a5005c5e159e7795c985888162b88609d5d fix in email sender, it was aplitting the attachments, or creating multiple, don't really know git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@33 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/utils/mail.py b/forum/utils/mail.py index 8dcc047..1dc2209 100644 --- a/forum/utils/mail.py +++ b/forum/utils/mail.py @@ -88,7 +88,8 @@ def send_email(subject, recipients, template, context={}, sender=None, images=[] if sender is None: sender = (str(settings.APP_SHORT_NAME), str(settings.DEFAULT_FROM_EMAIL)) - images.append((os.path.join(str(settings.UPFILES_FOLDER), os.path.basename(str(settings.APP_LOGO))), 'logo')) + if not len(images): + images = [(os.path.join(str(settings.UPFILES_FOLDER), os.path.basename(str(settings.APP_LOGO))), 'logo')] context.update(application_settings(None)) html_body = loader.get_template(template).render(Context(context))