diff --git a/frappe/contacts/doctype/contact/contact.py b/frappe/contacts/doctype/contact/contact.py index 70bd167960..085452988a 100644 --- a/frappe/contacts/doctype/contact/contact.py +++ b/frappe/contacts/doctype/contact/contact.py @@ -200,11 +200,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