Default to a total search when no keywords provided
This commit is contained in:
1 parent
19a8dd4172
commit
d1f1dbc1b2
1 file changed
+1
@@ -225,6 +225,7 @@ def search(request):
|
|||||||
|
|
||||||
tests = Test.objects.all()
|
tests = Test.objects.all()
|
||||||
keywords = request.POST['keywords'].upper().split()
|
keywords = request.POST['keywords'].upper().split()
|
||||||
|
if not keywords: keywords = [""]
|
||||||
|
|
||||||
if request.POST['engine'] != '':
|
if request.POST['engine'] != '':
|
||||||
tests = tests.filter(engine=request.POST['engine'])
|
tests = tests.filter(engine=request.POST['engine'])
|
||||||
|
|||||||
Reference in new issue
Block a user