don't show team under available if you have an invitation

This commit is contained in:
James Tauber 2012-08-03 00:56:52 -04:00
parent 52a443a237
commit 16630a6db3

View file

@ -23,9 +23,7 @@ class AvailableTeamsNode(template.Node):
teams = []
for team in Team.objects.all():
state = team.get_state_for_user(request.user)
if state == "invited":
teams.append(team)
elif team.access == "open" and state is None:
if team.access == "open" and state is None:
teams.append(team)
elif request.user.is_staff and state is None:
teams.append(team)