mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 03:21:05 +00:00
Order user shelf previews by book shelved date
This commit is contained in:
parent
ab307388f4
commit
acc68147dc
1 changed files with 3 additions and 1 deletions
|
@ -55,7 +55,9 @@ class User(View):
|
||||||
{
|
{
|
||||||
"name": user_shelf.name,
|
"name": user_shelf.name,
|
||||||
"local_path": user_shelf.local_path,
|
"local_path": user_shelf.local_path,
|
||||||
"books": user_shelf.books.all()[:3],
|
"books": user_shelf.books.order_by(
|
||||||
|
"-shelfbook__shelved_date"
|
||||||
|
).all()[:3],
|
||||||
"size": user_shelf.books.count(),
|
"size": user_shelf.books.count(),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue