refactor: added methods to access mentors from course with test cases

This commit is contained in:
Anand Chitipothu
2021-04-26 23:50:50 +05:30
parent 46e7a5c0d1
commit 8857b97773
3 changed files with 104 additions and 2 deletions

View File

@@ -25,6 +25,9 @@ class CommunityMember(WebsiteGenerator):
frappe.throw(_("Username can only contain alphabets, numbers and underscore."))
self.username = self.username.lower()
def __repr__(self):
return f"<CommunityMember: {self.email}>"
def create_member_from_user(doc, method):
member = frappe.get_doc({
"doctype": "Community Member",