fix: user permission on reports (#52709)

This commit is contained in:
Diptanil Saha
2026-02-17 21:56:25 +05:30
committed by GitHub
parent e6825476e7
commit c6a292f6a9
10 changed files with 44 additions and 56 deletions

View File

@@ -60,6 +60,6 @@ def get_conditions(filters):
match_conditions = build_match_conditions("Timesheet")
if match_conditions:
conditions += " and %s" % match_conditions
conditions += " and (%s)" % match_conditions
return conditions

View File

@@ -15,7 +15,7 @@ def query_task(doctype, txt, searchfield, start, page_len, filters):
search_string = "%%%s%%" % txt
order_by_string = "%s%%" % txt
match_conditions = build_match_conditions("Task")
match_conditions = ("and" + match_conditions) if match_conditions else ""
match_conditions = (f"and ({match_conditions})") if match_conditions else ""
return frappe.db.sql(
"""select name, subject from `tabTask`