Merge pull request #357 from frappe/develop

chore: Merge develop to main
This commit is contained in:
Shariq Ansari 2024-09-18 21:30:01 +05:30 committed by GitHub
commit d1f287b310
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -102,7 +102,8 @@ def get_customer_link(crm_deal):
else:
client = get_erpnext_site_client(erpnext_crm_settings)
try:
customer = client.get_list("Customer", {"crm_deal": crm_deal})[0]["name"]
customer = client.get_list("Customer", {"crm_deal": crm_deal})
customer = customer[0].get("name") if len(customer) else None
if customer:
return f"{erpnext_crm_settings.erpnext_site_url}/app/customer/{customer}"
else: