[minor] better message on permission

This commit is contained in:
Rushabh Mehta 2017-10-16 10:18:42 +05:30
parent 52d7d7af11
commit cd968348d7

View file

@ -57,7 +57,7 @@ def get_value(doctype, fieldname, filters=None, as_dict=True, debug=False):
:param filters: dict or string for identifying the record'''
if not frappe.has_permission(doctype):
frappe.throw(_("Not permitted"), frappe.PermissionError)
frappe.throw(_("No permission for {0}".format(doctype)), frappe.PermissionError)
try:
filters = json.loads(filters)