1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 18:52:55 +08:00

Fix some regressions in json output (we need to make all these explicit instead)

This commit is contained in:
Dean Herbert 2022-01-20 17:09:31 +09:00
parent ccddf9b47d
commit deb108816c
2 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,7 @@ namespace osu.Game.Beatmaps
public BeatmapMetadata Metadata { get; set; } = null!;
[JsonIgnore]
[Backlink(nameof(ScoreInfo.BeatmapInfo))]
public IQueryable<ScoreInfo> Scores { get; } = null!;

View File

@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using Newtonsoft.Json;
using osu.Framework.Testing;
using osu.Game.Database;
using osu.Game.Extensions;
@ -27,6 +28,7 @@ namespace osu.Game.Beatmaps
public DateTimeOffset DateAdded { get; set; }
[JsonIgnore]
public IBeatmapMetadataInfo Metadata => Beatmaps.FirstOrDefault()?.Metadata ?? new BeatmapMetadata();
public IList<BeatmapInfo> Beatmaps { get; } = null!;