From 82264e79868ad40437a3ca51d4d5c554b36a0702 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Thu, 12 Dec 2024 10:41:46 +0530 Subject: [PATCH] fix: keep a large enough limit on group-by query (#28754) Small change on top of https://github.com/frappe/frappe/pull/28740 Reason: Site with many many users might still have huge # of rows being returned. E.g. FC. This just makes UX slightly bad, but there's easy workaround for it. Users can just apply this filter -> "Owner = Self", whether users know it or not is a different question. --- frappe/desk/listview.py | 1 + 1 file changed, 1 insertion(+) diff --git a/frappe/desk/listview.py b/frappe/desk/listview.py index 29eb35f162..9c91026aa6 100644 --- a/frappe/desk/listview.py +++ b/frappe/desk/listview.py @@ -71,6 +71,7 @@ def get_group_by_count(doctype: str, current_filters: str, field: str) -> list[d group_by=f"`tab{doctype}`.{field}", fields=["count(*) as count", f"`{field}` as name"], order_by="count desc", + limit=1000, ) if field == "owner":