fix: use the correct doc method
This commit is contained in:
parent
96f35300a2
commit
09919a3e58
1 changed files with 1 additions and 1 deletions
|
|
@ -250,7 +250,7 @@ def check_write_permission(doctype: str = None, name: str = None):
|
|||
if doctype and name:
|
||||
try:
|
||||
doc = frappe.get_doc(doctype, name)
|
||||
doc.has_permission("write")
|
||||
doc.check_permission("write")
|
||||
except frappe.DoesNotExistError:
|
||||
# doc has not been inserted yet, name is set to "new-some-doctype"
|
||||
check_doctype = True
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue