summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authormaheshgudi2016-09-08 11:06:39 +0530
committermaheshgudi2016-09-08 11:06:39 +0530
commitbc8095aaa0fe19da925e244967eb9ae77cf0f970 (patch)
treea346d61a859d898c09b072690d2ae554aad5f6a1 /yaksh/views.py
parente423320c4682718cd39d2cfec4e5da59a86c68c0 (diff)
downloadonline_test-bc8095aaa0fe19da925e244967eb9ae77cf0f970.tar.gz
online_test-bc8095aaa0fe19da925e244967eb9ae77cf0f970.tar.bz2
online_test-bc8095aaa0fe19da925e244967eb9ae77cf0f970.zip
minor variable name changes in views
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index 08320be..592dd20 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -317,13 +317,13 @@ rights/permissions and log in."""
question_paper__quiz__is_trial=True
)
if request.method == "POST":
- delete_quiz = request.POST.getlist('delete_paper')
+ delete_paper = 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()
+ qpaper = answerpaper.question_paper
+ if qpaper.quiz.course.is_trial == True:
+ qpaper.quiz.course.delete()
else:
- qpaper = answerpaper.question_paper
if qpaper.answerpaper_set.count() == 1:
qpaper.quiz.delete()
else: