fix: Allow args and kwargs too

Co-authored-by: Aditya Hase <aditya@adityahase.com>
This commit is contained in:
gavin 2020-08-20 12:03:03 +05:30 committed by GitHub
parent aae0309ced
commit 557bceed02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -158,7 +158,7 @@ def execute(context, method, args=None, kwargs=None, profile=False):
try:
ret = frappe.get_attr(method)(*args, **kwargs)
except Exception:
ret = frappe.safe_eval(method + "()", eval_globals=globals(), eval_locals=locals())
ret = frappe.safe_eval(method + "(*args, **kwargs)", eval_globals=globals(), eval_locals=locals())
if profile:
pr.disable()