X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/967eed676fc83d15b26149047f353ac61faa8217..a409c6cc6901eea44c2cbe3a49038eb21f2db18d:/src/search/mock_search.py diff --git a/src/search/mock_search.py b/src/search/mock_search.py index 6c430400e..118078f9d 100644 --- a/src/search/mock_search.py +++ b/src/search/mock_search.py @@ -23,7 +23,7 @@ class Search(Mock): def _find_some_books(query_terms=None, max_results=20): from .index import SearchResult - qs = Book.objects.order_by('?') + qs = Book.objects.filter(findable=True).order_by('?') results = [] for book in qs[:randint(1, max_results)]: doc = {