fix: Person / Org name is not mandatory while creation of lead from email (#17676)

This commit is contained in:
Nabin Hait 2019-05-21 15:05:26 +05:30 committed by GitHub
parent 98a80407f8
commit 7327f8a901
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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