summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authorankitjavalkar2017-10-11 15:56:44 +0530
committerankitjavalkar2017-10-17 15:48:43 +0530
commit8939dfcefc151ba41c7cb0a2ed32effab9120b0e (patch)
treec3a5d14e773dde5aecfbcdb0f7a5fcbf487d388e /yaksh/models.py
parentd433fe75da28d7051b96f2fbdc5a01d5b5c159b1 (diff)
downloadonline_test-8939dfcefc151ba41c7cb0a2ed32effab9120b0e.tar.gz
online_test-8939dfcefc151ba41c7cb0a2ed32effab9120b0e.tar.bz2
online_test-8939dfcefc151ba41c7cb0a2ed32effab9120b0e.zip
Add tests to verify the change
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index e5285ba..6dc8ce2 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -1223,8 +1223,9 @@ class AnswerPaper(models.Model):
available question.
"""
if self.questions_order:
- all_questions = [int(q_id)
- for q_id in self.questions_order.split(',')]
+ all_questions = [
+ int(q_id) for q_id in self.questions_order.split(',')
+ ]
else:
all_questions = list(self.questions.all().values_list(
'id', flat=True))