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 ++++++++ 1 file changed, 8 insertions(+) (limited to 'activities') 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 -- cgit v1.2.3