fix: correct variable name for callable tree method in get_all_nodes
This commit is contained in:
parent
8ee593a1da
commit
6d7e91208e
1 changed files with 4 additions and 4 deletions
|
|
@ -15,13 +15,13 @@ def get_all_nodes(doctype: str, label: str, parent: str, tree_method: str | None
|
|||
|
||||
try:
|
||||
tree_method = frappe.override_whitelisted_method(tree_method)
|
||||
calleble_tree_method = frappe.get_attr(tree_method)
|
||||
callable_tree_method = frappe.get_attr(tree_method)
|
||||
except Exception as e:
|
||||
frappe.throw(_("Failed to get method for command {0} with {1}").format(tree_method, str(e)))
|
||||
|
||||
frappe.is_whitelisted(calleble_tree_method)
|
||||
frappe.is_whitelisted(callable_tree_method)
|
||||
|
||||
data = calleble_tree_method(doctype, parent, **filters)
|
||||
data = callable_tree_method(doctype, parent, **filters)
|
||||
out = [dict(parent=label, data=data)]
|
||||
|
||||
filters.pop("is_root", None)
|
||||
|
|
@ -29,7 +29,7 @@ def get_all_nodes(doctype: str, label: str, parent: str, tree_method: str | None
|
|||
|
||||
while to_check:
|
||||
parent = to_check.pop()
|
||||
data = calleble_tree_method(doctype, parent, is_root=False, **filters)
|
||||
data = callable_tree_method(doctype, parent, is_root=False, **filters)
|
||||
out.append(dict(parent=parent, data=data))
|
||||
for d in data:
|
||||
if d.get("expandable"):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue