make Global- and CountryLeaderboardRank nullable
This commit is contained in:
@@ -293,11 +293,11 @@ LIMIT 1
|
||||
for modeID, m := range [...]*modeData{&r.STD, &r.Taiko, &r.CTB, &r.Mania} {
|
||||
m.Level = ocl.GetLevelPrecise(int64(m.TotalScore))
|
||||
|
||||
if i := leaderboardPosition(md.R, modesToReadable[modeID], r.ID); i != 0 {
|
||||
m.GlobalLeaderboardRank = &i
|
||||
if i := leaderboardPosition(md.R, modesToReadable[modeID], r.ID); i != nil {
|
||||
m.GlobalLeaderboardRank = i
|
||||
}
|
||||
if i := countryPosition(md.R, modesToReadable[modeID], r.ID, r.Country); i != 0 {
|
||||
m.CountryLeaderboardRank = &i
|
||||
if i := countryPosition(md.R, modesToReadable[modeID], r.ID, r.Country); i != nil {
|
||||
m.CountryLeaderboardRank = i
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user