Merge pull request #1577 from hughrun/sort-recent

sort shelves by latest shelved date
This commit is contained in:
Mouse Reeve 2021-10-26 14:31:57 -07:00 committed by GitHub
commit 6ba605cbd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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