Do not create a set for already-distinct query result

This commit is contained in:
Adeodato Simó 2023-11-23 17:05:18 -03:00
parent 7c2de92df3
commit e322d3cae1
No known key found for this signature in database
GPG key ID: CDF447845F1A986F

View file

@ -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")