瀏覽代碼

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 年之前
父節點
當前提交
d09fd25ad7
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. +2
    -0
      frappe/model/document.py

+ 2
- 0
frappe/model/document.py 查看文件

@@ -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…
取消
儲存