fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Responsive images.
[wolnelektury.git]
/
src
/
search
/
mock_search.py
diff --git
a/src/search/mock_search.py
b/src/search/mock_search.py
index
6c43040
..
118078f
100644
(file)
--- 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
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 = {
results = []
for book in qs[:randint(1, max_results)]:
doc = {