fix!: Last overriden method should be considered
This commit is contained in:
parent
bfb463e814
commit
d117e2c08b
2 changed files with 3 additions and 3 deletions
|
|
@ -30,8 +30,8 @@ def handle_rpc_call(method: str, doctype: str | None = None):
|
|||
# Login works implicitly right now.
|
||||
return
|
||||
|
||||
for hook in frappe.get_hooks("override_whitelisted_methods", {}).get(method, []):
|
||||
# override using the first hook
|
||||
for hook in reversed(frappe.get_hooks("override_whitelisted_methods", {}).get(method, [])):
|
||||
# override using the last hook
|
||||
method = hook
|
||||
break
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ def handle():
|
|||
def execute_cmd(cmd, from_async=False):
|
||||
"""execute a request as python module"""
|
||||
for hook in reversed(frappe.get_hooks("override_whitelisted_methods", {}).get(cmd, [])):
|
||||
# override using the first hook
|
||||
# override using the last hook
|
||||
cmd = hook
|
||||
break
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue