diff --git a/OsuLazerServer/Database/Tables/Scores/Score.cs b/OsuLazerServer/Database/Tables/Scores/Score.cs index 2c244f656abab761fe8a082f4b92131d358039b8..05bf07f3536d70f8947965ca9a4d4f2d0d48c62f 100644 --- a/OsuLazerServer/Database/Tables/Scores/Score.cs +++ b/OsuLazerServer/Database/Tables/Scores/Score.cs @@ -62,12 +62,12 @@ public class DbScore public async Task ToOsuScore(IBeatmapSetResolver? resolver = null) { var ctx = new LazerContext(); - var beatmap = resolver is not null ? (await resolver.FetchBeatmap(BeatmapId)) : null; + var beatmap = resolver is not null ? await resolver.FetchBeatmap(BeatmapId) : null; return new APIScore { Accuracy = Accuracy, - Beatmap = beatmap is not null ? await beatmap?.ToOsu() : null, - beatmapSet = resolver is not null ? (await resolver.FetchSetAsync(beatmap.BeatmapsetId)).ToBeatmapSet() : null, + Beatmap = beatmap is not null && beatmap is not null ? await beatmap.ToOsu() : null, + beatmapSet = resolver is not null && beatmap is not null ? (await resolver.FetchSetAsync(beatmap.BeatmapsetId))?.ToBeatmapSet() : null, Date = SubmittedAt, Rank = ModeUtils.CalculateRank(this), Statistics = HitResultStats.FromJson(Statistics).ToOsu(),