diff options
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 6a7b800..46cf603 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1496,7 +1496,9 @@ class AnswerPaper(models.Model): objects = AnswerPaperManager() class Meta: - unique_together = ('user', 'question_paper', 'attempt_number') + unique_together = ('user', 'question_paper', + 'attempt_number', "course" + ) def get_per_question_score(self, question_id): if question_id not in self.get_questions().values_list('id', flat=True): |