1
0
Fork 0

Only show pending follow requests from active users

This commit is contained in:
Mouse Reeve 2022-07-24 12:26:58 -07:00
parent 056f9c45a4
commit f3bc7d759f
2 changed files with 6 additions and 1 deletions

View file

@ -174,6 +174,11 @@ class User(OrderedCollectionPageMixin, AbstractUser):
property_fields = [("following_link", "following")]
field_tracker = FieldTracker(fields=["name", "avatar"])
@property
def active_follower_requests(self):
"""Follow requests from active users"""
return self.follower_requests.filter(is_active=True)
@property
def confirmation_link(self):
"""helper for generating confirmation links"""