mirror of
https://github.com/ppy/osu
synced 2025-02-09 14:47:33 +00:00
Fix realm error. Apply OriginalBeatmapHash
on import
This commit is contained in:
parent
d23e787bc1
commit
b00848e742
@ -456,12 +456,6 @@ namespace osu.Game.Beatmaps
|
||||
if (transferCollections)
|
||||
beatmapInfo.TransferCollectionReferences(r, oldMd5Hash);
|
||||
|
||||
//Unlinking all scores from this beatmap
|
||||
r.All<ScoreInfo>().Where(s => s.BeatmapInfoID == beatmapInfo.ID).ForEach(s => s.BeatmapInfo = new BeatmapInfo());
|
||||
|
||||
//Linking all the previos scores
|
||||
r.All<ScoreInfo>().Where(s => s.OriginalBeatmapHash == beatmapInfo.Hash).ForEach(s => s.BeatmapInfo = beatmapInfo);
|
||||
|
||||
ProcessBeatmap?.Invoke((liveBeatmapSet, false));
|
||||
});
|
||||
}
|
||||
|
@ -123,6 +123,7 @@ namespace osu.Game.Scoring.Legacy
|
||||
// before returning for database import, we must restore the database-sourced BeatmapInfo.
|
||||
// if not, the clone operation in GetPlayableBeatmap will cause a dereference and subsequent database exception.
|
||||
score.ScoreInfo.BeatmapInfo = workingBeatmap.BeatmapInfo;
|
||||
score.ScoreInfo.OriginalBeatmapHash = workingBeatmap.BeatmapInfo.Hash;
|
||||
|
||||
return score;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user