feat: made all the cohort pages public

There is some info on the page that is only accessible to mentors and
admins and not shown to other users.
This commit is contained in:
Anand Chitipothu
2021-12-05 01:04:46 +05:30
parent fe31a64175
commit 7001ddc96f
6 changed files with 41 additions and 37 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ class Cohort(Document):
def get_subgroups(self, include_counts=False, sort_by=None):
names = frappe.get_all("Cohort Subgroup", filters={"cohort": self.name}, pluck="name")
subgroups = [frappe.get_doc("Cohort Subgroup", name) for name in names]
subgroups = [frappe.get_cached_doc("Cohort Subgroup", name) for name in names]
subgroups = sorted(subgroups, key=lambda sg: sg.title)
if include_counts: