refactor: moved community member class functions to user override
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe import _
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc("lms", "doctype", "lms_batch_membership")
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user