mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-03 05:48:44 +00:00
chore: formatting
This commit is contained in:
parent
59a8098517
commit
e0505722e1
1 changed files with 9 additions and 4 deletions
|
@ -31,7 +31,9 @@ class BookSeriesBy(View):
|
||||||
unsortable_books = []
|
unsortable_books = []
|
||||||
for work_id in set(work_ids):
|
for work_id in set(work_ids):
|
||||||
result = (
|
result = (
|
||||||
results.filter(parent_work=work_id).order_by("series_number", "-edition_rank").first()
|
results.filter(parent_work=work_id)
|
||||||
|
.order_by("series_number", "-edition_rank")
|
||||||
|
.first()
|
||||||
)
|
)
|
||||||
if result.series_number:
|
if result.series_number:
|
||||||
numbered_books.append(result)
|
numbered_books.append(result)
|
||||||
|
@ -48,7 +50,10 @@ class BookSeriesBy(View):
|
||||||
if book.first_published_date
|
if book.first_published_date
|
||||||
else book.published_date,
|
else book.published_date,
|
||||||
)
|
)
|
||||||
+ sorted(unsortable_books, key=lambda book: book.sort_title if book.sort_title else book.title)
|
+ sorted(
|
||||||
|
unsortable_books,
|
||||||
|
key=lambda book: book.sort_title if book.sort_title else book.title,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
|
|
Loading…
Reference in a new issue