diff --git a/watson/search.py b/watson/search.py index a040584..e51020f 100644 --- a/watson/search.py +++ b/watson/search.py @@ -537,20 +537,9 @@ class SearchEngine(object): object_id_int__in=queryset, ) else: - live_ids = list(queryset) - if live_ids: - filter &= Q( - object_id__in=live_ids, - ) - else: - # HACK: There is a bug in Django - # (https://code.djangoproject.com/ticket/15145) - # that messes up __in queries when the iterable is empty. - # This bit of nonsense ensures that this aspect of the query - # will be impossible to fulfill. - filter &= Q( - content_type=ContentType.objects.get_for_model(model).id + 1, - ) + filter &= Q( + object_id__in=queryset, + ) # Add the model to the filter. content_type = ContentType.objects.get_for_model(model) filter &= Q(