

def get_state_for_user(self, user):
    try:
        return self.memberships.get(user=user).state
    except Membership.DoesNotExist:
        return None

dataset/ETHPy150Open pinax/symposion/symposion/teams/models.py Team.get_state_for_user/original