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 828b0a0..bb8d193 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -529,7 +529,8 @@ class AnswerPaper(models.Model): def current_question(self): """Returns the current active question to display.""" - return self.questions_unanswered.first() + if self.questions_unanswered.all(): + return self.questions_unanswered.all()[0] def questions_left(self): """Returns the number of questions left.""" |