diff --git a/bookwyrm/views/notifications.py b/bookwyrm/views/notifications.py index 0c82f541..0a7a6200 100644 --- a/bookwyrm/views/notifications.py +++ b/bookwyrm/views/notifications.py @@ -13,7 +13,20 @@ class Notifications(View): def get(self, request, notification_type=None): """people are interacting with you, get hyped""" - notifications = request.user.notification_set.all().order_by("-created_date") + notifications = ( + request.user.notification_set.all() + .order_by("-created_date") + .select_related( + "related_status", + "related_status__reply_parent", + "related_import", + "related_report", + "related_user", + "related_book", + "related_list_item", + "related_list_item__book", + ) + ) if notification_type == "mentions": notifications = notifications.filter( notification_type__in=["REPLY", "MENTION", "TAG"]