summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorankitjavalkar2019-06-27 12:02:13 +0530
committerankitjavalkar2019-06-27 12:02:13 +0530
commit572f0fcd855a1a602537311fb2db0a800ca5ad1b (patch)
tree451b242fda5b743cf36845d7be12623de67cb601
parent354ff12a594997a7f48ee859244737f989564d0d (diff)
downloadonline_test-572f0fcd855a1a602537311fb2db0a800ca5ad1b.tar.gz
online_test-572f0fcd855a1a602537311fb2db0a800ca5ad1b.tar.bz2
online_test-572f0fcd855a1a602537311fb2db0a800ca5ad1b.zip
Fix Nonetype error due to incorrect if-else during course_code search
-rw-r--r--yaksh/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index f1ab13b..017d1ca 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -161,7 +161,7 @@ def quizlist_user(request, enrolled=None, msg=None):
if request.method == "POST":
course_code = request.POST.get('course_code')
hidden_courses = Course.objects.get_hidden_courses(code=course_code)
- courses = hidden_courses if hidden_courses else None
+ courses = hidden_courses
title = 'Search'
elif enrolled is not None: