diff --git a/symposion/teams/models.py b/symposion/teams/models.py index 4f9b4ed1..8ee38dba 100644 --- a/symposion/teams/models.py +++ b/symposion/teams/models.py @@ -26,6 +26,12 @@ class Team(models.Model): def __unicode__(self): return self.name + def get_state_for_user(self, user): + try: + return self.memberships.get(user=user).state + except Membership.DoesNotExist: + return None + MEMBERSHIP_STATE_CHOICES = [ ("applied", "applied"), diff --git a/symposion_project/templates/dashboard.html b/symposion_project/templates/dashboard.html index 33b3ee0b..15624294 100644 --- a/symposion_project/templates/dashboard.html +++ b/symposion_project/templates/dashboard.html @@ -135,7 +135,7 @@ {% for membership in user.memberships.all %}