Merge pull request #20073 from peppy/fix-tournament-lookup

Fix tournament population failure when beatmap is not found on server
This commit is contained in:
Dan Balasescu 2022-09-01 22:44:53 +09:00 committed by GitHub
commit e1e46ad7aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Game.Beatmaps;
using osu.Game.Extensions;
using osu.Game.Online.API.Requests.Responses;
@ -41,7 +40,7 @@ namespace osu.Game.Tournament.Models
StarRating = beatmap.StarRating;
Metadata = beatmap.Metadata;
Difficulty = beatmap.Difficulty;
Covers = beatmap.BeatmapSet.AsNonNull().Covers;
Covers = beatmap.BeatmapSet?.Covers ?? new BeatmapSetOnlineCovers();
}
public bool Equals(IBeatmapInfo? other) => other is TournamentBeatmap b && this.MatchesOnlineID(b);

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using Newtonsoft.Json;
namespace osu.Game.Beatmaps