This commit is contained in:
d42 2018-04-27 23:33:21 +02:00
parent b8677eebec
commit cbe2cce61b
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ def search(request):
results = apply_smart_search(query, Item.objects).all() results = apply_smart_search(query, Item.objects).all()
if results and len(results) == 1 or getattr(results[0], 'similarity', 0) == 1: if results and (len(results) == 1 or getattr(results[0], 'similarity', 0) == 1):
return redirect(results[0]) return redirect(results[0])
return render(request, 'results.html', { return render(request, 'results.html', {