Don't check suggested books against shelved books

It takes too long, and ideally this is your first action so you don't
have any books shelved yet.
This commit is contained in:
Mouse Reeve 2022-01-27 11:45:40 -08:00
parent 91f085c876
commit c0dabeee04

View file

@ -57,14 +57,7 @@ class GetStartedBooks(View):
if len(book_results) < 5:
popular_books = (
models.Edition.objects.exclude(
# exclude already shelved
Q(
parent_work__in=[
b.book.parent_work
for b in request.user.shelfbook_set.distinct().all()
]
)
| Q( # and exclude if it's already in search results
Q( # exclude if it's already in search results
parent_work__in=[b.parent_work for b in book_results]
)
)