Patch fix for Update Assessment Module Patch

This commit is contained in:
Neil Trini Lasrado 2017-01-30 17:50:05 +05:30
parent ab1ee1e6fc
commit fd1767d2ea

View File

@ -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")