File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,13 +141,21 @@ func (b *BatEngine) GroupCandidates(admissionsData []AdmissionCandidate) ([]Team
141141
142142 // Sort admissions candidates on a valid TeamID
143143 for _ , app := range admissionsData {
144- if app .TeamID .Valid && len ( teamMap [ app . TeamID . UUID ]) > 1 {
144+ if app .TeamID .Valid {
145145 teamMap [app .TeamID .UUID ] = append (teamMap [app .TeamID .UUID ], app )
146146 } else {
147147 individualCandidates = append (individualCandidates , app )
148148 }
149149 }
150150
151+ // Check for teams with only one member and move them to individualCandidates
152+ for teamID , candidates := range teamMap {
153+ if len (candidates ) == 1 {
154+ individualCandidates = append (individualCandidates , candidates [0 ])
155+ delete (teamMap , teamID )
156+ }
157+ }
158+
151159 teamsEvalData := make ([]TeamEvaluationData , 0 )
152160 for teamId , members := range teamMap {
153161 var totalScore float64
You can’t perform that action at this time.
0 commit comments