[patch] fixed reload doc and permission issue in guardian patch
This commit is contained in:
parent
1ffa76ba5c
commit
08aec855c4
@ -4,8 +4,9 @@ import frappe
|
|||||||
def execute():
|
def execute():
|
||||||
if frappe.db.exists("DocType", "Student") and "father_name" in frappe.db.get_table_columns("Student"):
|
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", "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"])
|
"mother_name", "mother_email_id"])
|
||||||
for stud in students:
|
for stud in students:
|
||||||
if stud.father_name:
|
if stud.father_name:
|
||||||
|
Loading…
Reference in New Issue
Block a user