fix: CohortSubgroup.has_student

Fixed the wrong query.

Issue #271
This commit is contained in:
Anand Chitipothu
2021-12-07 15:37:46 +05:30
parent 3cd4e64957
commit c8d7ac48ea

View File

@@ -22,9 +22,9 @@ class CohortSubgroup(Document):
"""Check if given user is a student of this subgroup.
"""
q = {
"doctype": "Cohort Student",
"doctype": "LMS Batch Membership",
"subgroup": self.name,
"email": email
"member": email
}
return frappe.db.exists(q)