fix: permission not applied on fetching goal chart

This commit is contained in:
Shivam Mishra 2020-11-06 14:04:52 +05:30
parent ca78636992
commit 9e0d2abc6a

View file

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