change error note and append team pointer in GetOrCreateTeamsByOIDCAndNames
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
5c033c52fc
commit
75db9beff9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue