summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index dc08307..1b76eed 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -1769,6 +1769,8 @@ class QuestionPaper(models.Model):
for question in questions:
marks += question.points
for question_set in self.random_questions.all():
+ question_set.marks = question_set.questions.first().points
+ question_set.save()
marks += question_set.marks * question_set.num_questions
self.total_marks = marks
self.save()