summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authorankitjavalkar2019-04-02 15:22:58 +0530
committerankitjavalkar2019-04-02 15:22:58 +0530
commit7f02a678b6bb4b5ad99022168109b0bb44e0e9d1 (patch)
tree8b5e74162850aeb3545112eb485faa894bd77ab2 /yaksh/models.py
parentef42d19a8884155da24398e7c27aade115a79ade (diff)
downloadonline_test-7f02a678b6bb4b5ad99022168109b0bb44e0e9d1.tar.gz
online_test-7f02a678b6bb4b5ad99022168109b0bb44e0e9d1.tar.bz2
online_test-7f02a678b6bb4b5ad99022168109b0bb44e0e9d1.zip
Change AnswerPaper passing condition check
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 7a40fae..f9dda45 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -548,7 +548,7 @@ class Quiz(models.Model):
user=user, course=course, question_paper=qp
).order_by("-attempt_number")
if ans_ppr.exists():
- return ans_ppr.first().passed
+ return any([paper.passed for paper in ans_ppr])
return False
def _create_quiz_copy(self, user):