Update set_student_guardian.py

This commit is contained in:
Nabin Hait 2016-09-08 17:57:55 +05:30 committed by GitHub
parent fff6e19479
commit e5d13f3156

View File

@ -5,6 +5,8 @@ def execute():
frappe.reload_doc("schools", "doctype", "student") frappe.reload_doc("schools", "doctype", "student")
frappe.reload_doc("schools", "doctype", "student_guardian") frappe.reload_doc("schools", "doctype", "student_guardian")
frappe.reload_doc("schools", "doctype", "student_sibling") frappe.reload_doc("schools", "doctype", "student_sibling")
if "student" not in frappe.db.get_table_columns("Guardian"):
return
guardian = frappe.get_all("Guardian", fields=["name", "student"]) guardian = frappe.get_all("Guardian", fields=["name", "student"])
for d in guardian: for d in guardian:
if d.student: if d.student: