From e322d3cae1720504814b2fa6afd39fdab0390d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adeodato=20Sim=C3=B3?= Date: Thu, 23 Nov 2023 17:05:18 -0300 Subject: [PATCH] Do not create a set for already-distinct query result --- bookwyrm/book_search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/book_search.py b/bookwyrm/book_search.py index ceb228f40..3012482fd 100644 --- a/bookwyrm/book_search.py +++ b/bookwyrm/book_search.py @@ -137,7 +137,7 @@ def search_title_author( # filter out multiple editions of the same work list_results = [] - for work_id in set(editions_of_work[:30]): + for work_id in editions_of_work[:30]: result = ( results.filter(parent_work=work_id) .order_by("-rank", "-edition_rank")