From 1fdef35b884efcb87401a09dd85d016c8c285f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89lie=20Bouttier?= Date: Mon, 1 Sep 2014 18:53:45 -0700 Subject: [PATCH] fix: cant add user to team if already in other team --- accounts/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts/views.py b/accounts/views.py index acea134..e7407a4 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -181,7 +181,7 @@ def user_add_team(request, user): else: # We do not use user.teams because we want to be able to add an # user to a team even if he is already a member through a group - if Team.objects.filter(users=user).exists(): + if Team.objects.filter(name=team,users=user).exists(): messages.info(request, 'User already in team.') else: team.users.add(user)