Merge pull request #15615 from ankush/perm_import
fix: AttributeError when calling frappe.permissions.$function
This commit is contained in:
commit
2ea25f0baa
1 changed files with 2 additions and 0 deletions
|
|
@ -188,6 +188,8 @@ class Document(BaseDocument):
|
|||
is not set.
|
||||
|
||||
:param permtype: one of `read`, `write`, `submit`, `cancel`, `delete`"""
|
||||
import frappe.permissions
|
||||
|
||||
if self.flags.ignore_permissions:
|
||||
return True
|
||||
return frappe.permissions.has_permission(self.doctype, permtype, self, verbose=verbose)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue