mirror of
https://github.com/ppy/osu.git
synced 2026-06-01 13:20:11 +08:00
Use a transaction when adding a beatmap
Fixes flakey unit test.
This commit is contained in:
@@ -56,7 +56,11 @@ namespace osu.Game.Beatmaps
|
||||
/// <param name="beatmapSet">The beatmap to add.</param>
|
||||
public void Add(BeatmapSetInfo beatmapSet)
|
||||
{
|
||||
Connection.InsertOrReplaceWithChildren(beatmapSet, true);
|
||||
Connection.RunInTransaction(() =>
|
||||
{
|
||||
Connection.InsertOrReplaceWithChildren(beatmapSet, true);
|
||||
});
|
||||
|
||||
BeatmapSetAdded?.Invoke(beatmapSet);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user