Permalink
Browse files

Fixed attachments being None

  • Loading branch information...
1 parent 9bd8e37 commit 65be09f3c3d2f80c6ac78f6813953de46aadd2b8 @hvdklauw hvdklauw committed Nov 30, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 generic_mail/__init__.py
View
@@ -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

0 comments on commit 65be09f

Please sign in to comment.