mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:57:36 +08:00
Merge pull request #16657 from peppy/skip-scores-missing-beatmap
Skip scores missing beatmaps during realm migration
This commit is contained in:
commit
6beb0ff2a4
@ -374,12 +374,12 @@ namespace osu.Game.Database
|
||||
log($"Migrated {written}/{count} scores...");
|
||||
}
|
||||
|
||||
var beatmap = r.All<BeatmapInfo>().First(b => b.Hash == score.BeatmapInfo.Hash);
|
||||
var beatmap = r.All<BeatmapInfo>().FirstOrDefault(b => b.Hash == score.BeatmapInfo.Hash);
|
||||
var ruleset = r.Find<RulesetInfo>(score.Ruleset.ShortName);
|
||||
|
||||
if (ruleset == null)
|
||||
if (beatmap == null || ruleset == null)
|
||||
{
|
||||
log($"Skipping {++missing} scores with missing ruleset");
|
||||
log($"Skipping {++missing} scores with missing ruleset or beatmap");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user