mirror of https://github.com/ppy/osu
Update tournament migration logic to check for null `Country`
This commit is contained in:
parent
1b2b42bb8a
commit
b2b2a4adaf
|
@ -22,7 +22,8 @@ public class TournamentUser : IUser
|
|||
/// <summary>
|
||||
/// The player's country.
|
||||
/// </summary>
|
||||
public Country? Country { get; set; }
|
||||
[JsonProperty("country_code")]
|
||||
public Country Country { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The player's global rank, or null if not available.
|
||||
|
|
|
@ -186,7 +186,9 @@ private bool addPlayers()
|
|||
{
|
||||
var playersRequiringPopulation = ladder.Teams
|
||||
.SelectMany(t => t.Players)
|
||||
.Where(p => string.IsNullOrEmpty(p.Username) || p.Rank == null).ToList();
|
||||
.Where(p => string.IsNullOrEmpty(p.Username)
|
||||
|| p.Country == default
|
||||
|| p.Rank == null).ToList();
|
||||
|
||||
if (playersRequiringPopulation.Count == 0)
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue