mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-16 05:06:32 +00:00
sort shelves by latest shelved date
Display the latest 2 books to be shelved in each shelf, when in the homepage feed view. fixes #1576
This commit is contained in:
parent
f2b11c6ad1
commit
097da148be
1 changed files with 1 additions and 0 deletions
|
@ -224,6 +224,7 @@ def get_suggested_books(user, max_books=5):
|
|||
.filter(
|
||||
shelfbook__shelf=shelf,
|
||||
)
|
||||
.order_by('-shelfbook__shelved_date')
|
||||
.prefetch_related("authors")[:limit],
|
||||
}
|
||||
suggested_books.append(shelf_preview)
|
||||
|
|
Loading…
Reference in a new issue