diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 3ba8adc3c8e..821a7d39ec8 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -242,5 +242,5 @@ def _make_customer(source_name, ignore_permissions=False): frappe.throw(_("Please create Customer from Lead {0}").format(lead_name)) else: return customer_name - else: - return frappe.get_doc("Customer",quotation[2]) + elif quotation and quotation[1]: + return frappe.get_doc("Customer",quotation[1])