From 28fd355f247d169fe656c7610b034e69777c3543 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 20 Jun 2022 11:16:24 +0530 Subject: [PATCH] chore: translate before searching doctype --- frappe/contacts/address_and_contact.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/contacts/address_and_contact.py b/frappe/contacts/address_and_contact.py index 8d078196e0..1c5803ffea 100644 --- a/frappe/contacts/address_and_contact.py +++ b/frappe/contacts/address_and_contact.py @@ -185,13 +185,13 @@ def filter_dynamic_link_doctypes( distinct=True, order_by=None, ) - doctypes_from_df = {d for d in _doctypes_from_df if txt.lower() in d.lower()} + doctypes_from_df = {d for d in _doctypes_from_df if txt.lower() in _(d).lower()} filters.update({"dt": ("not in", doctypes_from_df)}) _doctypes_from_cdf = frappe.get_all( "Custom Field", filters=filters, pluck="dt", distinct=True, order_by=None ) - doctypes_from_cdf = {d for d in _doctypes_from_cdf if txt.lower() in d.lower()} + doctypes_from_cdf = {d for d in _doctypes_from_cdf if txt.lower() in _(d).lower()} all_doctypes = doctypes_from_df.union(doctypes_from_cdf) allowed_doctypes = set(get_doctypes_with_read())