Merge pull request #9201 from Thunderbottom/email-account-com-fix

fix(email): check if communication hasattr for attachment
This commit is contained in:
sahil28297 2020-01-05 12:49:54 +05:30 committed by GitHub
commit 5ef0c80ee4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -293,7 +293,7 @@ class EmailAccount(Document):
else:
frappe.db.commit()
if communication:
if communication and hasattr(communication, "_attachments"):
attachments = [d.file_name for d in communication._attachments]
communication.notify(attachments=attachments, fetched_from_email_account=True)