From cbe2cce61bb86a4a6bcf6002ccbc6ac83e04f549 Mon Sep 17 00:00:00 2001 From: d42 Date: Fri, 27 Apr 2018 23:33:21 +0200 Subject: [PATCH] fix --- storage/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/views.py b/storage/views.py index 68fbdf2..2b62122 100644 --- a/storage/views.py +++ b/storage/views.py @@ -63,7 +63,7 @@ def search(request): 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 render(request, 'results.html', {