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 7757951..0c5a6f5 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -1784,6 +1784,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()