Browse Source

fix: import permissions

For some reason not importing this is causing issue with running the
functionality directly; specifically when running from background job.
version-14
Ankush Menat 3 years ago
parent
commit
d09fd25ad7
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      frappe/model/document.py

+ 2
- 0
frappe/model/document.py View File

@@ -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…
Cancel
Save