There is an error when appending an incoming email to Lead.
The following error is logged
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py", line 275, in receive
communication = self.insert_communication(msg, args=args)
File "/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py", line 374, in insert_communication
self.set_thread(communication, email)
File "/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py", line 425, in set_thread
parent = self.create_new_parent(communication, email)
File "/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py", line 498, in create_new_parent
parent.insert(ignore_permissions=True)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 218, in insert
self.run_before_save_methods()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 859, in run_before_save_methods
self.run_method("validate")
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 755, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1024, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1007, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 749, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/crm/doctype/lead/lead.py", line 26, in validate
self.set_lead_name()
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/crm/doctype/lead/lead.py", line 104, in set_lead_name
frappe.db.set_value("Lead", self.name, "lead_name", self.organization_name)
AttributeError: 'Lead' object has no attribute 'organization_name'