fix: Person / Org name is not mandatory while creation of lead from email

This commit is contained in:
Nabin Hait
2019-05-20 12:16:34 +05:30
parent a144e002db
commit 286c4fa640

View File

@@ -110,7 +110,7 @@ class Lead(SellingController):
def set_lead_name(self):
if not self.lead_name:
# Check for leads being created through data import
if not self.company_name:
if not self.company_name and not self.flags.ignore_mandatory:
frappe.throw(_("A Lead requires either a person's name or an organization's name"))
self.lead_name = self.company_name