From 572f0fcd855a1a602537311fb2db0a800ca5ad1b Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Thu, 27 Jun 2019 12:02:13 +0530 Subject: Fix Nonetype error due to incorrect if-else during course_code search --- yaksh/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yaksh') 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: -- cgit From 0929244e446f13aa7de40910e6d8d158ae6786bd Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Tue, 23 Jul 2019 12:00:17 +0530 Subject: Fix course filter query to display only non trial courses on the dashboard --- yaksh/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yaksh') diff --git a/yaksh/views.py b/yaksh/views.py index 017d1ca..8d179b4 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -165,7 +165,7 @@ def quizlist_user(request, enrolled=None, msg=None): 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( -- cgit