diff options
author | adityacp | 2017-03-16 11:28:01 +0530 |
---|---|---|
committer | adityacp | 2017-03-16 11:28:01 +0530 |
commit | 81a70c486823149b009627eb0194618ceeeb2369 (patch) | |
tree | 8b15793c8ed5e2398a937d796803c9ff8a1b1e78 | |
parent | 17c9dd17449adb19ce7734e3572ac0bc376ca5c5 (diff) | |
download | online_test-81a70c486823149b009627eb0194618ceeeb2369.tar.gz online_test-81a70c486823149b009627eb0194618ceeeb2369.tar.bz2 online_test-81a70c486823149b009627eb0194618ceeeb2369.zip |
Change in models get_ordered_questions function
- Add else condition to return fixed questions if order are not available
-rw-r--r-- | yaksh/models.py | 2 |
1 files changed, 2 insertions, 0 deletions
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): |