mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-02-07 13:59:39 +01:00
Address multipart mime ending up in description, for #700
This commit is contained in:
parent
f6fe5a7834
commit
344dd75a1c
@ -507,7 +507,7 @@ def object_from_message(message, queue, logger):
|
|||||||
counter += 1
|
counter += 1
|
||||||
|
|
||||||
if not body:
|
if not body:
|
||||||
mail = BeautifulSoup(part.get_payload(), "lxml")
|
mail = BeautifulSoup(str(message), "html.parser")
|
||||||
beautiful_body = mail.find('body')
|
beautiful_body = mail.find('body')
|
||||||
if beautiful_body:
|
if beautiful_body:
|
||||||
try:
|
try:
|
||||||
@ -515,7 +515,7 @@ def object_from_message(message, queue, logger):
|
|||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
if not body:
|
if not body:
|
||||||
body = mail.text
|
body = ""
|
||||||
|
|
||||||
smtp_priority = message.get('priority', '')
|
smtp_priority = message.get('priority', '')
|
||||||
smtp_importance = message.get('importance', '')
|
smtp_importance = message.get('importance', '')
|
||||||
|
Loading…
Reference in New Issue
Block a user