mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-26 10:00:33 +00:00
Removes duplicates from all books view
This commit is contained in:
parent
d60684e08e
commit
2cc9e3bbca
1 changed files with 8 additions and 1 deletions
|
@ -72,9 +72,16 @@ class Shelf(View):
|
|||
"start_date"
|
||||
)
|
||||
|
||||
if shelf_identifier:
|
||||
books = books.annotate(
|
||||
shelved_date=F("shelfbook__shelved_date")
|
||||
)
|
||||
else:
|
||||
books = books.annotate(
|
||||
shelved_date=F("updated_date")
|
||||
)
|
||||
books = books.annotate(
|
||||
rating=Subquery(reviews.values("rating")[:1]),
|
||||
shelved_date=F("shelfbook__shelved_date"),
|
||||
start_date=Subquery(reading.values("start_date")[:1]),
|
||||
finish_date=Subquery(reading.values("finish_date")[:1]),
|
||||
author=Subquery(
|
||||
|
|
Loading…
Reference in a new issue