mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 18:42:56 +08:00
Perform a reload on objects when Refreshing them
Previously, it was possible for an object to be "refreshed" with a stale cached state from the current thread's context. This ensures a check against the database is performed as well. Resolves #1562.
This commit is contained in:
parent
1824540325
commit
85827f83eb
@ -35,6 +35,7 @@ namespace osu.Game.Database
|
||||
|
||||
var id = obj.ID;
|
||||
obj = lookupSource?.SingleOrDefault(t => t.ID == id) ?? context.Find<T>(id);
|
||||
context.Entry(obj).Reload();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user