Skip to content

Column 'marks_out_of' cannot be null in patch #1400

@hasanmfd

Description

@hasanmfd

After Upgrade lms from v1 to v2

The issue is from the patch file :
lms.patches.v2_0.update_quiz_submission_data

Expected behavior
Bench migrate is not completely done.

This is the code :
I believe need to check marks_out_of for possible null:

	for question in questions:
		if question.question_name:
			marks_out_of = frappe.db.get_value(
				"LMS Quiz Question",
				{"parent": submission.quiz, "question": question.question_name},
				["marks"],
			)

			frappe.db.set_value(
				"LMS Quiz Result",
				{"parent": submission.name, "question_name": question.question_name},
				"marks_out_of",
				marks_out_of,
			)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions