Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed attachments being None

  • Loading branch information...
commit 65be09f3c3d2f80c6ac78f6813953de46aadd2b8 1 parent 9bd8e37
@hvdklauw hvdklauw authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 generic_mail/__init__.py
View
5 generic_mail/__init__.py
@@ -189,8 +189,9 @@ def create_message(self, send_text, send_html):
message.body = html
message.content_subtype = 'html'
- for attachment in self.attachments:
- message.attach_file(attachment)
+ if self.attachments:
+ for attachment in self.attachments:
+ message.attach_file(attachment)
return message
Please sign in to comment.
Something went wrong with that request. Please try again.