fix: permission issue on cohort page

Using get_all instead of get_list to disable permission check.

Issue #271
This commit is contained in:
Anand Chitipothu
2021-12-03 16:03:14 +05:30
parent c963e93b52
commit d84302682e

View File

@@ -24,7 +24,7 @@ class Cohort(Document):
return subgroups
def _get_subgroup_counts(self, doctype, **kw):
rows = frappe.get_list(doctype,
rows = frappe.get_all(doctype,
filters={"cohort": self.name, **kw},
fields=['subgroup', 'count(*) as count'],
group_by='subgroup')