diff options
author | mahesh | 2018-01-30 15:02:55 +0530 |
---|---|---|
committer | mahesh | 2018-01-30 16:46:41 +0530 |
commit | 782fd83b5931efde8ae26795c65e952df5012d0f (patch) | |
tree | 758881fc7e31709bb5c1e63d42b3bc0a043cf087 /yaksh/models.py | |
parent | a4bf74684bcb32e461defc36e48ba71bf7f02c03 (diff) | |
download | online_test-782fd83b5931efde8ae26795c65e952df5012d0f.tar.gz online_test-782fd83b5931efde8ae26795c65e952df5012d0f.tar.bz2 online_test-782fd83b5931efde8ae26795c65e952df5012d0f.zip |
Add test cases to check for duplicate answerpapers
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 4dd045a..6a7b800 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1186,12 +1186,6 @@ class QuestionPaper(models.Model): ans_paper.questions_order = ",".join(question_ids) ans_paper.save() ans_paper.questions_unanswered.add(*questions) - except AnswerPaper.MultipleObjectsReturned: - ans_paper = AnswerPaper.objects.filter(user=user, - attempt_number=attempt_num, - question_paper=self, - course_id=course_id - ).order_by('id').last() return ans_paper def _is_attempt_allowed(self, user, course_id): |