fix: incoming mail handler

While creating a communication record from incoming mail is failing
in a case where there exists a reference document.

reason for bug is misspelled `self.from_email` as `email.from_email`
This commit is contained in:
leela 2021-06-17 07:31:10 +05:30
parent f4be870e58
commit f54600a400

View file

@ -802,7 +802,7 @@ class InboundMail(Email):
except frappe.DuplicateEntryError:
# try and find matching parent
parent_name = frappe.db.get_value(self.email_account.append_to,
{email_fileds.sender_field: email.from_email}
{email_fileds.sender_field: self.from_email}
)
if parent_name:
parent.name = parent_name