summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorankitjavalkar2020-09-03 17:31:21 +0530
committerankitjavalkar2020-09-03 17:31:21 +0530
commit4f09013487e17e40b8fd14a3e4c574702c302fbb (patch)
tree77b5c0ea31446bfe632c6ab8d2ed84478f686bb6
parent7b6297ca80b0ec5bc86cfaf3971d7a50064d930d (diff)
downloadonline_test-4f09013487e17e40b8fd14a3e4c574702c302fbb.tar.gz
online_test-4f09013487e17e40b8fd14a3e4c574702c302fbb.tar.bz2
online_test-4f09013487e17e40b8fd14a3e4c574702c302fbb.zip
Fetch only distinct answered questions
-rw-r--r--yaksh/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 6542daa..1fee87b 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -2316,7 +2316,7 @@ class AnswerPaper(models.Model):
return self.questions.filter(active=True)
def get_questions_answered(self):
- return self.questions_answered.all()
+ return self.questions_answered.all().distinct()
def get_questions_unanswered(self):
return self.questions_unanswered.all()