fix: double response processing

This commit is contained in:
Ankush Menat 2023-09-03 20:12:24 +05:30
parent d5a21a2676
commit 507343f4f6
2 changed files with 2 additions and 3 deletions

View file

@ -103,7 +103,8 @@ def application(request: Request):
deprecation_warning(
f"{frappe.form_dict.cmd}: Sending `cmd` for RPC calls is deprecated, call REST API instead `/api/method/cmd`"
)
response = frappe.handler.handle()
frappe.handler.handle()
response = frappe.utils.response.build_response("json")
elif request.path.startswith("/api/"):
response = frappe.api.handle(request)

View file

@ -57,8 +57,6 @@ def handle():
# add the response to `message` label
frappe.response["message"] = data
return build_response("json")
def execute_cmd(cmd, from_async=False):
"""execute a request as python module"""