summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authord42 <d42@users.noreply.github.com>2018-04-27 23:33:21 +0200
committerd42 <d42@users.noreply.github.com>2018-04-27 23:33:21 +0200
commitcbe2cce61bb86a4a6bcf6002ccbc6ac83e04f549 (patch)
treef53bd3ebc8b224624fab4e4000cb0a06275b384c
parentb8677eebecd29bbfce921203a7f8396a442c621d (diff)
downloadspejstore-cbe2cce61bb86a4a6bcf6002ccbc6ac83e04f549.tar.gz
spejstore-cbe2cce61bb86a4a6bcf6002ccbc6ac83e04f549.tar.bz2
spejstore-cbe2cce61bb86a4a6bcf6002ccbc6ac83e04f549.zip
fix
-rw-r--r--storage/views.py2
1 files changed, 1 insertions, 1 deletions
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', {