fix: cant add user to team if already in other team
This commit is contained in:
parent
5c0e20a380
commit
1fdef35b88
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue