fix: new assessment doc creation

This commit is contained in:
Jannat Patel
2023-06-02 14:33:55 +05:30
parent a101e7b089
commit f0aa5b8744

View File

@@ -197,5 +197,6 @@ def update_assessment(type, name, value, class_name):
if exists and not value:
frappe.db.delete("LMS Assessment", exists)
elif not exists and value:
filters.update({"doctype": "LMS Assessment"})
frappe.get_doc(filters).insert()
doc = frappe.new_doc("LMS Assessment")
doc.update(filters)
doc.insert()