1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:20:04 +08:00

Merge pull request #28213 from bdach/fix-realm-migration-fail

Fix total score without mods migration failing on custom ruleset scores when custom ruleset cannot be loaded
This commit is contained in:
Dean Herbert 2024-05-19 15:55:36 +08:00 committed by GitHub
commit 5e1f6964d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1134,7 +1134,17 @@ namespace osu.Game.Database
case 41:
foreach (var score in migration.NewRealm.All<ScoreInfo>())
LegacyScoreDecoder.PopulateTotalScoreWithoutMods(score);
{
try
{
// this can fail e.g. if a user has a score set on a ruleset that can no longer be loaded.
LegacyScoreDecoder.PopulateTotalScoreWithoutMods(score);
}
catch (Exception ex)
{
Logger.Log($@"Failed to populate total score without mods for score {score.ID}: {ex}", LoggingTarget.Database);
}
}
break;
}