summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradityacp2017-03-16 11:28:01 +0530
committeradityacp2017-03-16 11:28:01 +0530
commit81a70c486823149b009627eb0194618ceeeb2369 (patch)
tree8b15793c8ed5e2398a937d796803c9ff8a1b1e78
parent17c9dd17449adb19ce7734e3572ac0bc376ca5c5 (diff)
downloadonline_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.py2
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):