From be377653fe209992631b14e5071aedb98e60ee2a Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Fri, 16 Dec 2022 17:32:04 -0700 Subject: Fix inbound/outbound links --- activities/views/follows.py | 8 ++++++++ templates/activities/follows.html | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/activities/views/follows.py b/activities/views/follows.py index f5f5909..5e14740 100644 --- a/activities/views/follows.py +++ b/activities/views/follows.py @@ -53,4 +53,12 @@ class Follows(ListView): target=self.request.identity, source_id__in=identity_ids ).values_list("source_id", flat=True) context["inbound"] = self.inbound + context["num_inbound"] = Follow.objects.filter( + target=self.request.identity, + state__in=FollowStates.group_active(), + ).count() + context["num_outbound"] = Follow.objects.filter( + source=self.request.identity, + state__in=FollowStates.group_active(), + ).count() return context diff --git a/templates/activities/follows.html b/templates/activities/follows.html index bc2db7d..5ee695f 100644 --- a/templates/activities/follows.html +++ b/templates/activities/follows.html @@ -5,11 +5,11 @@ {% block content %}
@@ -35,11 +35,11 @@