mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-26 13:25:20 +00:00
fix: user permission on reports (#52709)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user