limit page length to 20 by default only to api requests
This commit is contained in:
parent
7cad548270
commit
b6e9b9b7ca
2 changed files with 2 additions and 1 deletions
|
|
@ -101,6 +101,7 @@ def handle():
|
|||
if frappe.local.request.method=="GET":
|
||||
if frappe.local.form_dict.get('fields'):
|
||||
frappe.local.form_dict['fields'] = json.loads(frappe.local.form_dict['fields'])
|
||||
frappe.local.form_dict.setdefault('limit_page_length', 20)
|
||||
frappe.local.response.update({
|
||||
"data": frappe.call(frappe.client.get_list,
|
||||
doctype, **frappe.local.form_dict)})
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import json, os
|
|||
|
||||
@frappe.whitelist()
|
||||
def get_list(doctype, fields=None, filters=None, order_by=None,
|
||||
limit_start=None, limit_page_length=None):
|
||||
limit_start=None, limit_page_length=20):
|
||||
return frappe.get_list(doctype, fields=fields, filters=filters, order_by=order_by,
|
||||
limit_start=limit_start, limit_page_length=limit_page_length, ignore_permissions=True)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue