@@ -23,15 +23,10 @@ class AvailableTeamsNode(template.Node):
teams = []
for team in Team.objects.all():
state = team.get_state_for_user(request.user)
if team.access == "open":
if state in [None, "invited"]:
teams.append(team)
elif team.access == "application":
if state in [None, "invited", "applied"]:
elif team.access == "invitation":
if state == "invited":
elif team.access == "open" and state is None:
context[self.context_var] = teams
return u""