diff --git a/erpnext/crm/doctype/lead/lead.js b/erpnext/crm/doctype/lead/lead.js
index bd1639bb12..ad24a6e222 100644
--- a/erpnext/crm/doctype/lead/lead.js
+++ b/erpnext/crm/doctype/lead/lead.js
@@ -85,7 +85,7 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller
render_basic_info_html() {
let html='';
- if (cur_frm.doc.lead_owner){
+ if (cur_frm.doc.lead_owner) {
html += `
Lead Owner
@@ -94,7 +94,7 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller
` ;
}
- if (cur_frm.doc.email_id){
+ if (cur_frm.doc.email_id) {
html += `
Email
@@ -103,7 +103,7 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller
` ;
}
- if (cur_frm.doc.mobile_no){
+ if (cur_frm.doc.mobile_no) {
html += `
Mobile
diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py
index ce36069052..f09a814540 100644
--- a/erpnext/crm/doctype/lead/lead.py
+++ b/erpnext/crm/doctype/lead/lead.py
@@ -95,7 +95,7 @@ class Lead(SellingController):
if d.link_doctype == self.doctype and d.link_name == self.name:
to_remove = d
if to_remove:
- link_doctype.remove(to_remove)
+ linked_doc.remove(to_remove)
def has_customer(self):
return frappe.db.get_value("Customer", {"lead_name": self.name})