diff options
author | ankitjavalkar | 2017-10-09 15:12:09 +0530 |
---|---|---|
committer | ankitjavalkar | 2017-10-09 15:14:24 +0530 |
commit | d433fe75da28d7051b96f2fbdc5a01d5b5c159b1 (patch) | |
tree | a9b3c5f07dd620f3a1c87c1e58073a8a07f0191f /yaksh | |
parent | 97a277cf5b86f60525f94302d5b04de420ad7212 (diff) | |
download | online_test-d433fe75da28d7051b96f2fbdc5a01d5b5c159b1.tar.gz online_test-d433fe75da28d7051b96f2fbdc5a01d5b5c159b1.tar.bz2 online_test-d433fe75da28d7051b96f2fbdc5a01d5b5c159b1.zip |
Fix bug that prevents students from revisiting AnswerPaper with only one question
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/models.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 787daa6..e5285ba 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1215,10 +1215,7 @@ class AnswerPaper(models.Model): self.questions_answered.add(question_id) self.questions_unanswered.remove(question_id) - next_question = self.next_question(question_id) - if next_question and next_question.id == int(question_id): - return None - return next_question + return self.next_question(question_id) def next_question(self, question_id): """ |