fix: import permissions
For some reason not importing this is causing issue with running the functionality directly; specifically when running from background job.
This commit is contained in:
parent
6f8f792c01
commit
d09fd25ad7
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