fix: add condition for name

(cherry picked from commit cf5a2d6351)
This commit is contained in:
venkat102
2025-09-04 21:00:52 +05:30
committed by Mergify
parent 5ef7a7857c
commit 65ce737c2d

View File

@@ -2475,6 +2475,10 @@ def build_qb_match_conditions(doctype, user=None) -> list:
for filter in match_filters:
for link_option, allowed_values in filter.items():
fieldnames = link_fields_map.get(link_option, [])
cond = None
if link_option == doctype:
cond = _dt["name"].isin(allowed_values)
for fieldname in fieldnames:
field = _dt[fieldname]
@@ -2483,6 +2487,7 @@ def build_qb_match_conditions(doctype, user=None) -> list:
if not apply_strict_user_permissions:
cond = (Coalesce(field, "") == "") | cond
if cond:
criterion.append(cond)
return criterion