Merge pull request #38564 from frappe/mergify/bp/version-15-hotfix/pr-38562

fix: get dynamic link with parenttype contact (backport #38562)
This commit is contained in:
Shariq Ansari 2023-12-04 19:22:37 +05:30 committed by GitHub
commit 39e04b119a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,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: