fix: permission not applied on fetching goal chart
This commit is contained in:
parent
ca78636992
commit
9e0d2abc6a
1 changed files with 4 additions and 0 deletions
|
|
@ -57,6 +57,10 @@ def get_monthly_goal_graph_data(title, doctype, docname, goal_value_field, goal_
|
|||
from frappe.utils.formatters import format_value
|
||||
import json
|
||||
|
||||
# should have atleast read perm
|
||||
if not frappe.has_permission(goal_doctype):
|
||||
return None
|
||||
|
||||
meta = frappe.get_meta(doctype)
|
||||
doc = frappe.get_doc(doctype, docname)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue