Fixed Student Guardian patch - permission issue

This commit is contained in:
Neil Trini Lasrado 2016-09-06 17:10:58 +05:30
parent 194fbaca13
commit 6a95723a70

View File

@ -4,7 +4,7 @@ def execute():
if frappe.db.exists("DocType", "Guardian"):
frappe.reload_doc("schools", "doctype", "student")
frappe.reload_doc("schools", "doctype", "student_guardian")
guardian = frappe.get_list("Guardian", fields=["name", "student"])
guardian = frappe.get_all("Guardian", fields=["name", "student"])
for d in guardian:
if d.student:
student = frappe.get_doc("Student", d.student)