diff options
author | Andrew Godwin | 2022-12-16 17:32:04 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-12-16 17:32:04 -0700 |
commit | be377653fe209992631b14e5071aedb98e60ee2a (patch) | |
tree | 853f29a4ecbe433b528b8b0aa9c95dfa85c464f5 /activities | |
parent | 00795f119eeb4b8eb1330b7959ca5ef93accc64b (diff) | |
download | takahe-be377653fe209992631b14e5071aedb98e60ee2a.tar.gz takahe-be377653fe209992631b14e5071aedb98e60ee2a.tar.bz2 takahe-be377653fe209992631b14e5071aedb98e60ee2a.zip |
Fix inbound/outbound links
Diffstat (limited to 'activities')
-rw-r--r-- | activities/views/follows.py | 8 |
1 files changed, 8 insertions, 0 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 |