From c0dabeee0463341d9037dd8033625959d160c508 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 27 Jan 2022 11:45:40 -0800 Subject: [PATCH] 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. --- bookwyrm/views/get_started.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/bookwyrm/views/get_started.py b/bookwyrm/views/get_started.py index 48423b118..3285c076f 100644 --- a/bookwyrm/views/get_started.py +++ b/bookwyrm/views/get_started.py @@ -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] ) )