Fix for squads relations
This commit is contained in:
parent
2617375f46
commit
5fda8af5fa
@ -43,6 +43,8 @@ func (dc *DataCache) loadSquads() {
|
||||
dc.squads[squads[i].ID] = &squads[i]
|
||||
dc.squadsWithChats[squads[i].ID] = &squadWithChat
|
||||
}
|
||||
|
||||
dc.squadPlayers[squads[i].ID] = make(map[int]*dbmapping.SquadPlayerFull)
|
||||
}
|
||||
|
||||
for i := range squadsPlayersRelations {
|
||||
@ -58,10 +60,6 @@ func (dc *DataCache) loadSquads() {
|
||||
squadPlayer.Squad = *sSquad
|
||||
squadPlayer.UserRole = squadsPlayersRelations[i].UserType
|
||||
|
||||
if dc.squadPlayers[sSquad.Squad.ID] == nil {
|
||||
dc.squadPlayers[sSquad.Squad.ID] = make(map[int](*dbmapping.SquadPlayerFull))
|
||||
}
|
||||
|
||||
dc.squadPlayers[sSquad.Squad.ID][sPlayer.ID] = &squadPlayer
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user