refactor: member field in lms quiz submission

This commit is contained in:
Jannat Patel
2022-06-20 17:44:14 +05:30
parent 6ccb5e8dbf
commit 5e875b6d71
4 changed files with 46 additions and 5 deletions

View File

@@ -0,0 +1,8 @@
import frappe
def execute():
frappe.reload_doc("lms", "doctype", "lms_quiz_submission")
submissions = frappe.db.get_all("LMS Quiz Submission", fields=["name", "owner"])
for submission in submissions:
frappe.db.set_value("LMS Quiz Submission", submission.name, "member", submission.owner)