diff options
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 7c4e9af..08320be 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -317,15 +317,15 @@ rights/permissions and log in.""" question_paper__quiz__is_trial=True ) if request.method == "POST": - delete_quiz = request.POST.getlist('delete_quiz') - for answerpaper_id in delete_quiz: + delete_quiz = request.POST.getlist('delete_paper') + for answerpaper_id in delete_paper: answerpaper = AnswerPaper.objects.get(id=answerpaper_id) if answerpaper.question_paper.quiz.course.is_trial == True: answerpaper.question_paper.quiz.course.delete() else: qpaper = answerpaper.question_paper if qpaper.answerpaper_set.count() == 1: - answerpaper.question_paper.quiz.delete() + qpaper.quiz.delete() else: answerpaper.delete() users_per_paper = [] |