fix: get dynamic link with parenttype contact

(cherry picked from commit 3d7ad71b22)
This commit is contained in:
Shariq Ansari
2023-12-04 19:19:09 +05:30
committed by Mergify
parent efc6a8a044
commit 12d3cda2d9

View File

@@ -40,7 +40,7 @@ class Lead(SellingController, CRMNote):
if self.source == "Existing Customer" and self.customer:
contact = frappe.db.get_value(
"Dynamic Link",
{"link_doctype": "Customer", "link_name": self.customer},
{"link_doctype": "Customer", "parenttype": "Contact", "link_name": self.customer},
"parent",
)
if contact: