From 3b06c185ecb17131ea2b63c2ee80a6b33438427c Mon Sep 17 00:00:00 2001 From: Himanshu Date: Thu, 22 Aug 2019 22:14:12 +0530 Subject: [PATCH] Update frappe/contacts/doctype/contact/contact.py Co-Authored-By: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> --- frappe/contacts/doctype/contact/contact.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/contacts/doctype/contact/contact.py b/frappe/contacts/doctype/contact/contact.py index ab8b114192..3e52be186f 100644 --- a/frappe/contacts/doctype/contact/contact.py +++ b/frappe/contacts/doctype/contact/contact.py @@ -205,11 +205,11 @@ def get_contact_with_phone_number(number): if not number: return contacts = frappe.get_all('Contact Phone', filters=[ - ['phone', 'like', '{0}'.format(number)] + ['phone', 'like', '%{0}'.format(number)] ], fields=["parent"], limit=1) return contacts[0].parent if contacts else None def get_contact_name(email_id): contact = frappe.get_list("Contact Email", filters={"email_id": email_id}, fields=["parent"], limit=1) - return contact[0].parent if contact else None \ No newline at end of file + return contact[0].parent if contact else None