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

Handle the case where the ruleset isn't found in the EF database any more

This commit is contained in:
Dean Herbert 2021-11-23 19:15:52 +09:00
parent 40cd998f99
commit 6b134359c9

View File

@ -270,7 +270,7 @@ namespace osu.Game.Database
}
private string? getRulesetShortNameFromLegacyID(long rulesetId) =>
efContextFactory?.Get().RulesetInfo.First(r => r.ID == rulesetId)?.ShortName;
efContextFactory?.Get().RulesetInfo.FirstOrDefault(r => r.ID == rulesetId)?.ShortName;
/// <summary>
/// Flush any active contexts and block any further writes.