From 5313b283dd3c834df419cfd60420035310a2608a Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 2 Jan 2022 07:16:02 -0800 Subject: [PATCH] Adds comment --- bookwyrm/views/shelf/shelf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bookwyrm/views/shelf/shelf.py b/bookwyrm/views/shelf/shelf.py index 85d9e39f7..0662f302d 100644 --- a/bookwyrm/views/shelf/shelf.py +++ b/bookwyrm/views/shelf/shelf.py @@ -75,6 +75,7 @@ class Shelf(View): if shelf_identifier: books = books.annotate(shelved_date=F("shelfbook__shelved_date")) else: + # sorting by shelved date will cause duplicates in the "all books" view books = books.annotate(shelved_date=F("updated_date")) books = books.annotate( rating=Subquery(reviews.values("rating")[:1]),