summaryrefslogtreecommitdiff
path: root/chimere/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/views.py')
-rw-r--r--chimere/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/chimere/views.py b/chimere/views.py
index 0afb6fa..968492c 100644
--- a/chimere/views.py
+++ b/chimere/views.py
@@ -948,7 +948,7 @@ if hasattr(settings, 'CHIMERE_SEARCH_ENGINE') \
def autocomplete(request):
sqs = SearchQuerySet().autocomplete(
content_auto=request.GET.get('q', ''))[:5]
- suggestions = [result.object.name for result in sqs]
+ suggestions = [result.object.name for result in sqs if result.object]
# make sure it returns a JSON object, not a bare list.
# otherwise, it could be vulnerable to an XSS attack.
the_data = json.dumps({