Fixes to update student guardian name patch

This commit is contained in:
Neil Trini Lasrado 2017-01-27 17:44:28 +05:30
parent 4db5dd3cc2
commit 6d0da98a78

View File

@ -2,6 +2,7 @@ import frappe
from frappe.model.utils.rename_field import rename_field
def execute():
frappe.reload_doc("schools", "doctype", "student_guardian")
student_guardians = frappe.get_all("Student Guardian", fields=["guardian"])
for student_guardian in student_guardians:
guardian_name = frappe.db.get_value("Guardian", student_guardian.guardian, "guardian_name")