From 11602c1e6bac448b607fd68a83d0c097506b8cc2 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Wed, 8 Jan 2025 13:45:50 +0530 Subject: [PATCH] fix: revert document_list return format --- frappe/api/v2.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frappe/api/v2.py b/frappe/api/v2.py index bbf29f4562..bddbebb5a9 100644 --- a/frappe/api/v2.py +++ b/frappe/api/v2.py @@ -97,11 +97,8 @@ def document_list(doctype: str): query = return_value data = query.run(as_dict=True, debug=debug) - - return { - "result": data[:limit], - "has_next_page": len(data) > limit, - } + frappe.response["has_next_page"] = len(data) > limit + return data[:limit] def count(doctype: str) -> int: