Skip to content

Commit

Permalink
Ensure team exists in AllTeams before attempting to override it
Browse files Browse the repository at this point in the history
  • Loading branch information
jspaleta committed Dec 11, 2024
1 parent 5b8ff27 commit d6ead62
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,12 @@ func (c *Config) IndexTeams() {

func applyTeamOverrides(teams map[string]*OverrideTeamConfig, allTeams map[string]*TeamConfig) {
for teamName, team := range teams {
allTeams[teamName].Members = team.Members
allTeams[teamName].Mentors = team.Mentors
if _, ok := allTeams[teamName]; ok {
allTeams[teamName].Members = team.Members
allTeams[teamName].Mentors = team.Mentors
} else {
fmt.Printf("Override Warning: team %s missing from config\n", teamName)
}
}
}

Expand Down

0 comments on commit d6ead62

Please sign in to comment.