]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/utils/mail.py
ALteration of the schema to a single content model. As a bonus there is a complete...
[osqa.git] / forum / utils / mail.py
index 8dcc047bbece0b5bf85b49e476349ea52e1839db..1dc2209f81b21e87dc8ea095ca4ca9dcea9ef470 100644 (file)
@@ -88,7 +88,8 @@ def send_email(subject, recipients, template, context={}, sender=None, images=[]
     if sender is None:\r
         sender = (str(settings.APP_SHORT_NAME), str(settings.DEFAULT_FROM_EMAIL))\r
 \r
-    images.append((os.path.join(str(settings.UPFILES_FOLDER), os.path.basename(str(settings.APP_LOGO))), 'logo'))\r
+    if not len(images):\r
+        images = [(os.path.join(str(settings.UPFILES_FOLDER), os.path.basename(str(settings.APP_LOGO))), 'logo')]\r
 \r
     context.update(application_settings(None))\r
     html_body = loader.get_template(template).render(Context(context))\r