fix: wrap get_match_cond() in parentheses to prevent or bug

This commit is contained in:
KerollesFathy 2026-03-12 20:37:49 +00:00
parent 5092225cbc
commit b7ca2fdf78

View file

@ -809,7 +809,7 @@ def get_match_cond(doctype, as_condition=True):
if not as_condition:
return cond
return ((" and " + cond) if cond else "").replace("%", "%%")
return ((" and (" + cond + ")") if cond else "").replace("%", "%%")
def build_match_conditions(doctype, user=None, as_condition=True):