fix: search instead of match (#31557)

Match isn't correct usage here
This commit is contained in:
Ankush Menat 2025-03-07 12:29:23 +05:30 committed by GitHub
parent 38fd079be5
commit 77852fd11f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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