fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix findable
[wolnelektury.git]
/
src
/
opds
/
views.py
diff --git
a/src/opds/views.py
b/src/opds/views.py
index
6d04c6c
..
8e929c6
100644
(file)
--- a/
src/opds/views.py
+++ b/
src/opds/views.py
@@
-434,7
+434,7
@@
class SearchFeed(AcquisitionFeed):
results = q.execute()
book_scores = dict([(r['book_id'], r['score']) for r in results])
results = q.execute()
book_scores = dict([(r['book_id'], r['score']) for r in results])
- books = Book.objects.filter(id__in=set([r['book_id'] for r in results]))
+ books = Book.objects.filter(
findable=True,
id__in=set([r['book_id'] for r in results]))
books = list(books)
books.sort(reverse=True, key=lambda book: book_scores[book.id])
return books
books = list(books)
books.sort(reverse=True, key=lambda book: book_scores[book.id])
return books