mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-13 18:31:10 +01:00
Merge branch 'develop' into bootstrap4
This commit is contained in:
commit
5940b706c1
@ -362,11 +362,13 @@ def ticket_from_message(message, queue, logger):
|
||||
|
||||
if not body:
|
||||
mail = BeautifulSoup(part.get_payload(), "lxml")
|
||||
if ">" in mail.text:
|
||||
body = mail.find('body')
|
||||
body = body.text
|
||||
body = body.encode('ascii', errors='ignore')
|
||||
else:
|
||||
beautiful_body = mail.find('body')
|
||||
if beautiful_body:
|
||||
try:
|
||||
body = beautiful_body.text
|
||||
except AttributeError:
|
||||
pass
|
||||
if not body:
|
||||
body = mail.text
|
||||
|
||||
if ticket:
|
||||
|
Loading…
Reference in New Issue
Block a user