diff options
author | ankitjavalkar | 2019-07-26 12:47:34 +0530 |
---|---|---|
committer | GitHub | 2019-07-26 12:47:34 +0530 |
commit | e3c6eb62c6e5ea509e194367db7d3de2986632a7 (patch) | |
tree | 364da6771e8b1b0feb160795c060a50329bab16d /yaksh | |
parent | 519cbb803c8020527578d2e9cc1b55a20f29c8ee (diff) | |
parent | 0929244e446f13aa7de40910e6d8d158ae6786bd (diff) | |
download | online_test-e3c6eb62c6e5ea509e194367db7d3de2986632a7.tar.gz online_test-e3c6eb62c6e5ea509e194367db7d3de2986632a7.tar.bz2 online_test-e3c6eb62c6e5ea509e194367db7d3de2986632a7.zip |
Merge pull request #610 from ankitjavalkar/fix-nonetype-error
Fix Nonetype error due to incorrect if-else during course_code search
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index f1ab13b..8d179b4 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -161,11 +161,11 @@ 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: - courses = user.students.all().order_by('-id') + courses = user.students.filter(is_trial=False).order_by('-id') title = 'Enrolled Courses' else: courses = Course.objects.filter( |