diff options
author | ankitjavalkar | 2020-09-03 17:31:21 +0530 |
---|---|---|
committer | ankitjavalkar | 2020-09-03 17:31:21 +0530 |
commit | 4f09013487e17e40b8fd14a3e4c574702c302fbb (patch) | |
tree | 77b5c0ea31446bfe632c6ab8d2ed84478f686bb6 /yaksh | |
parent | 7b6297ca80b0ec5bc86cfaf3971d7a50064d930d (diff) | |
download | online_test-4f09013487e17e40b8fd14a3e4c574702c302fbb.tar.gz online_test-4f09013487e17e40b8fd14a3e4c574702c302fbb.tar.bz2 online_test-4f09013487e17e40b8fd14a3e4c574702c302fbb.zip |
Fetch only distinct answered questions
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/models.py | 2 |
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() |