Merge pull request #37970 from KerollesFathy/fix/get-match-cond-unparenthesized-or

fix: wrap `get_match_cond()` in parentheses
This commit is contained in:
Ejaaz Khan 2026-03-16 12:40:19 +05:30 committed by GitHub
commit 071357de34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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):