From 25f1a717252b7e60056b17abd7e0f2b10e495aa6 Mon Sep 17 00:00:00 2001 From: Adam Coddington Date: Sun, 20 Jan 2013 13:44:49 -0800 Subject: [PATCH] Allow message to be saved without attachments. --- django_mailbox/models.py | 7 +++++-- setup.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/django_mailbox/models.py b/django_mailbox/models.py index b0325e5..7f71e8d 100755 --- a/django_mailbox/models.py +++ b/django_mailbox/models.py @@ -256,7 +256,10 @@ class Message(models.Model): null=True, ) - attachments = models.ManyToManyField(MessageAttachment) + attachments = models.ManyToManyField( + MessageAttachment, + blank=True, + ) objects = models.Manager() unread_messages = UnreadMessageManager() @@ -321,4 +324,4 @@ class Message(models.Model): return email.message_from_string(self.body) def __unicode__(self): - return self.subject \ No newline at end of file + return self.subject diff --git a/setup.py b/setup.py index 4bae595..26992ba 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ tests_require=['django'] setup( name='django-mailbox', - version='1.6.1', + version='1.6.2', url='http://bitbucket.org/latestrevision/django-mailbox/', description='Import mail from POP3, IMAP, local mailboxes or directly from Postfix or Exim4 into your Django application automatically.', author='Adam Coddington',