change error note and append team pointer in GetOrCreateTeamsByOIDCAndNames
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
viehlieb 2023-05-09 13:36:23 +02:00
parent 5c033c52fc
commit 75db9beff9
1 changed files with 2 additions and 2 deletions

View File

@ -245,7 +245,7 @@ func AssignOrCreateUserToTeams(s *xorm.Session, u *user.User, teamData []models.
if !exists {
err = tm.Create(s, u)
if err != nil {
log.Errorf("Could not assign %v to %v. %v", u.Username, team.Name, err)
log.Errorf("Could not assign user %s to team %s: %v", u.Username, team.Name, err)
}
}
oidcTeams = append(oidcTeams, team.ID)
@ -335,7 +335,7 @@ func GetOrCreateTeamsByOIDCAndNames(s *xorm.Session, teamData []models.OIDCTeamD
te = append(te, newTeam)
} else {
log.Debugf("Team with oidc_id %v and name %v already exists.", team.OidcID, team.Name)
te = append(te, &team)
te = append(te, team)
}
}
return te, err