1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-07 06:45:23 +02:00

fix(teams): create more then one team [EE-2184] (#6305)

fixes [EE-2184]
This commit is contained in:
Chaim Lev-Ari 2021-12-23 07:57:32 +02:00 committed by GitHub
parent cdfa9b25a8
commit 8fc5a5e8a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 82 additions and 1 deletions

View file

@ -63,7 +63,7 @@ func (service *Service) TeamByName(name string) (*portainer.Team, error) {
logrus.WithField("obj", obj).Errorf("Failed to convert to Team object")
return nil, fmt.Errorf("Failed to convert to Team object: %s", obj)
}
if strings.EqualFold(t.Name, name) {
if strings.EqualFold(team.Name, name) {
t = team
return nil, stop
}