Add byte cast to email processing for Python 3

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-04-21 04:02:50 -04:00
parent 90b3d01171
commit c9bd2ab9a5

View File

@@ -161,7 +161,7 @@ class EmailBaseModel(IntervalBaseModel):
label = 'email_body.txt'
if source.store_body:
with ContentFile(content=message.body, name=label) as file_object:
with ContentFile(content=force_bytes(message.body), name=label) as file_object:
documents = source.handle_upload(
document_type=source.document_type,
file_object=file_object,