diff --git a/bookwyrm/templatetags/bookwyrm_tags.py b/bookwyrm/templatetags/bookwyrm_tags.py index 1c9151577..de3948868 100644 --- a/bookwyrm/templatetags/bookwyrm_tags.py +++ b/bookwyrm/templatetags/bookwyrm_tags.py @@ -70,6 +70,9 @@ def related_status(notification): @register.simple_tag(takes_context=True) def active_shelf(context, book): """check what shelf a user has a book on, if any""" + if hasattr(book, "current_shelves"): + return book.current_shelves[0] + shelf = ( models.ShelfBook.objects.filter( shelf__user=context["request"].user,