1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-09 22:38:19 +02:00

Always re-open filefield before reading.

This commit is contained in:
Adam Coddington 2015-04-13 20:20:11 -07:00
parent 830343bf78
commit 50282414aa
2 changed files with 2 additions and 1 deletions

View file

@ -621,6 +621,7 @@ class Message(models.Model):
def get_email_object(self):
""" Returns an `email.message.Message` instance for this message."""
if self.eml:
self.eml.open()
body = self.eml.file.read()
else:
body = self.get_body()