Merge pull request #5956 from nabinhait/guardian_patch_fix
[patch] fixed reload doc and permission issue in guardian patch
This commit is contained in:
commit
16a0fef759
@ -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…
x
Reference in New Issue
Block a user