[fix] throw permission error in db_query.py
This commit is contained in:
parent
09af425b1b
commit
cbc5d8c39a
1 changed files with 1 additions and 1 deletions
|
|
@ -283,7 +283,7 @@ class DatabaseQuery(object):
|
|||
if not meta.istable and not role_permissions.get("read") and not self.flags.ignore_permissions:
|
||||
only_if_shared = True
|
||||
if not self.shared:
|
||||
frappe.throw(_("No permission to read {0}").format(self.doctype))
|
||||
frappe.throw(_("No permission to read {0}").format(self.doctype), frappe.PermissionError)
|
||||
else:
|
||||
self.conditions.append(self.get_share_condition())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue