From 77852fd11f10a7c1cb0dc76df63140ebbfde5073 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 7 Mar 2025 12:29:23 +0530 Subject: [PATCH] fix: search instead of match (#31557) Match isn't correct usage here --- frappe/database/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/database/query.py b/frappe/database/query.py index f2797f3775..953da5a0f1 100644 --- a/frappe/database/query.py +++ b/frappe/database/query.py @@ -557,7 +557,7 @@ def get_nested_set_hierarchy_result(doctype: str, name: str, hierarchy: str) -> @lru_cache(maxsize=1024) def _sanitize_field(field: str, is_mariadb): - if field == "*" or not SPECIAL_CHAR_PATTERN.match(field): + if field == "*" or not SPECIAL_CHAR_PATTERN.search(field): # Skip checking if there are no special characters return field