refactor: moved community member class functions to user override

This commit is contained in:
pateljannat
2021-05-21 16:22:59 +05:30
parent 63d00a46c4
commit 637c795321
13 changed files with 31 additions and 29 deletions

View File

@@ -1,6 +1,5 @@
from __future__ import unicode_literals
import frappe
from frappe import _
def execute():
frappe.reload_doc("lms", "doctype", "lms_batch_membership")

View File

@@ -0,0 +1,9 @@
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("lms", "doctype", "lms_course_mentor_mapping")
mappings = frappe.get_all("LMS Course Mentor Mapping", ["mentor", "name"])
for mapping in mappings:
email = frappe.db.get_value("Community Member", mapping.mentor, "email")
frappe.db.set_value("LMS Course Mentor Mapping", mapping.name, "mentor", email)