From 4f09013487e17e40b8fd14a3e4c574702c302fbb Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Thu, 3 Sep 2020 17:31:21 +0530 Subject: Fetch only distinct answered questions --- yaksh/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yaksh/models.py') 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() -- cgit