fix: show the recent join requests on the top

Issue #271
This commit is contained in:
Anand Chitipothu
2021-12-04 22:52:56 +05:30
parent fb447a30e4
commit 52fd891370

View File

@@ -43,7 +43,7 @@ class CohortSubgroup(Document):
"subgroup": self.name,
"status": status
}
return frappe.get_all("Cohort Join Request", filters=q, fields=["*"], order_by="creation")
return frappe.get_all("Cohort Join Request", filters=q, fields=["*"], order_by="creation desc")
def get_mentors(self):
emails = frappe.get_all("Cohort Mentor", filters={"subgroup": self.name}, fields=["email"], pluck='email')