Merge branch 'develop' into bootstrap4

This commit is contained in:
Garret Wassermann 2018-12-20 21:55:24 -05:00
commit 5940b706c1
3 changed files with 9 additions and 7 deletions

View File

@ -362,11 +362,13 @@ def ticket_from_message(message, queue, logger):
if not body: if not body:
mail = BeautifulSoup(part.get_payload(), "lxml") mail = BeautifulSoup(part.get_payload(), "lxml")
if ">" in mail.text: beautiful_body = mail.find('body')
body = mail.find('body') if beautiful_body:
body = body.text try:
body = body.encode('ascii', errors='ignore') body = beautiful_body.text
else: except AttributeError:
pass
if not body:
body = mail.text body = mail.text
if ticket: if ticket: