From 81a70c486823149b009627eb0194618ceeeb2369 Mon Sep 17 00:00:00 2001 From: adityacp Date: Thu, 16 Mar 2017 11:28:01 +0530 Subject: Change in models get_ordered_questions function - Add else condition to return fixed questions if order are not available --- yaksh/models.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'yaksh/models.py') diff --git a/yaksh/models.py b/yaksh/models.py index 2569892..28af8f6 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -765,6 +765,8 @@ class QuestionPaper(models.Model): que_order = self.fixed_question_order.split(',') for que_id in que_order: ques.append(self.fixed_questions.get(id=que_id)) + else: + ques = self.fixed_questions.all() return ques def __str__(self): -- cgit