mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:22:55 +08:00
Use a transaction when adding a beatmap
Fixes flakey unit test.
This commit is contained in:
parent
bd79a69e2e
commit
6807caa752
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user