fix: Check for command in case of API call
This commit is contained in:
parent
38861decab
commit
f2d619bb2c
1 changed files with 1 additions and 1 deletions
|
|
@ -144,7 +144,7 @@ def rebuild_tree(doctype, parent_field):
|
|||
"""
|
||||
|
||||
# Check for perm if called from client-side
|
||||
if frappe.request:
|
||||
if frappe.request and frappe.local.form_dict.cmd == 'rebuild_tree':
|
||||
frappe.only_for('System Manager')
|
||||
|
||||
# get all roots
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue