mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 03:21:05 +00:00
Python formatting
This commit is contained in:
parent
9185708224
commit
f0f65b8b73
1 changed files with 5 additions and 3 deletions
|
@ -101,9 +101,11 @@ def search_title_author(query, min_confidence, *filters, return_first=False):
|
|||
# filter out multiple editions of the same work
|
||||
list_results = []
|
||||
for work_id in set(editions_of_work[:30]):
|
||||
result = results.filter(parent_work=work_id).order_by(
|
||||
"-rank", "-edition_rank"
|
||||
).first()
|
||||
result = (
|
||||
results.filter(parent_work=work_id)
|
||||
.order_by("-rank", "-edition_rank")
|
||||
.first()
|
||||
)
|
||||
|
||||
if return_first:
|
||||
return result
|
||||
|
|
Loading…
Reference in a new issue