From f54600a400c347ae5d9c3f5154c76b99044c9480 Mon Sep 17 00:00:00 2001 From: leela Date: Thu, 17 Jun 2021 07:31:10 +0530 Subject: [PATCH] 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` --- frappe/email/receive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/email/receive.py b/frappe/email/receive.py index 9ad560aa4a..2e42008951 100644 --- a/frappe/email/receive.py +++ b/frappe/email/receive.py @@ -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