Skip to content

Commit

Permalink
Merge pull request #20073 from peppy/fix-tournament-lookup
Browse files Browse the repository at this point in the history
Fix tournament population failure when beatmap is not found on server
  • Loading branch information
smoogipoo authored Sep 1, 2022
2 parents 8b26527 + d3ae60e commit e1e46ad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 1 addition & 2 deletions osu.Game.Tournament/Models/TournamentBeatmap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -41,7 +40,7 @@ public TournamentBeatmap(APIBeatmap beatmap)
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);
Expand Down
2 changes: 0 additions & 2 deletions osu.Game/Beatmaps/BeatmapSetOnlineCovers.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit e1e46ad

Please sign in to comment.