diff --git a/hc/accounts/models.py b/hc/accounts/models.py index baa7b323..0590cabc 100644 --- a/hc/accounts/models.py +++ b/hc/accounts/models.py @@ -213,6 +213,9 @@ class Profile(models.Model): def member_count(self): return Member.objects.filter(project__owner__profile=self).count() + def members(self): + return Member.objects.filter(project__owner__profile=self).all() + class Project(models.Model): code = models.UUIDField(default=uuid.uuid4, editable=False, unique=True) diff --git a/templates/accounts/profile.html b/templates/accounts/profile.html index 08fb85e4..824c50c0 100644 --- a/templates/accounts/profile.html +++ b/templates/accounts/profile.html @@ -118,14 +118,14 @@

Team Access

- {% if profile.member_set.count %} + {% if profile.member_count %} - {% for member in profile.member_set.all %} + {% for member in profile.members %}
{{ profile.user.email }} Owner
{{ member.user.email }} Member