diff --git a/erpnext/patches/v7_2/update_assessment_modules.py b/erpnext/patches/v7_2/update_assessment_modules.py index 550292e184..ac04294cb3 100644 --- a/erpnext/patches/v7_2/update_assessment_modules.py +++ b/erpnext/patches/v7_2/update_assessment_modules.py @@ -20,7 +20,8 @@ def execute(): frappe.reload_doc("schools", "doctype", "evaluation_criteria") - for assessment in frappe.get_all("Assessment Plan", fields=["name", "grading_scale"]): + for assessment in frappe.get_all("Assessment Plan", fields=["name", "grading_scale"], filters = [["docstatus", "!=", 2 ]]): + print assessment for stud_result in frappe.db.sql("select * from `tabAssessment Result` where parent= %s", assessment.name, as_dict=True): if stud_result.result: assessment_result = frappe.new_doc("Assessment Result")