diff options
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 2d84622..61c9059 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -988,7 +988,8 @@ class AnswerPaper(models.Model): questions and returns the next question. """ next_question = self.next_question(question_id) - self.questions_answered.add(question_id) + if question_id not in self.questions_answered.all(): + self.questions_answered.add(question_id) self.questions_unanswered.remove(question_id) if next_question.id == int(question_id): return None |