diff --git a/erpnext/patches/v7_0/make_guardian.py b/erpnext/patches/v7_0/make_guardian.py index b6b0a80873..f2d0cf7c8b 100644 --- a/erpnext/patches/v7_0/make_guardian.py +++ b/erpnext/patches/v7_0/make_guardian.py @@ -4,8 +4,9 @@ import frappe def execute(): if frappe.db.exists("DocType", "Student") and "father_name" in frappe.db.get_table_columns("Student"): frappe.reload_doc("schools", "doctype", "student") + frappe.reload_doc("schools", "doctype", "guardian") - students = frappe.get_list("Student", fields=["name", "father_name", "father_email_id", + students = frappe.get_all("Student", fields=["name", "father_name", "father_email_id", "mother_name", "mother_email_id"]) for stud in students: if stud.father_name: