aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/ResolverHelper.cs
diff options
context:
space:
mode:
authorTowyTowy <towy@airreps.link>2026-07-09 13:39:09 +0200
committerTowyTowy <towy@airreps.link>2026-07-09 13:39:09 +0200
commit2326ecdedc042f7f1c2ce2a5da409377c09778d7 (patch)
treee6dee88eb93b9e46ec4912f998cd25f8a59bca23 /Emby.Server.Implementations/Library/ResolverHelper.cs
parent53aafcd38e1f4558ff18f5258d0d46b3a0565783 (diff)
Fix profile image being impossible to clear when its in-memory key is temporary
ClearProfileImageAsync removed the ProfileImage instance attached to the passed-in User, but that instance can carry a stale, never-persisted (temporary) key because UpdateUserAsync creates the persisted image on a separately loaded entity and never copies the generated key back. Removing that detached entity on a fresh DbContext made EF Core throw InvalidOperationException ('ImageInfo.Id has a temporary value'), leaving the profile image impossible to delete or replace. Load the tracked, persisted user and remove its actual ProfileImage, matching the removal pattern already used in UpdateUserAsync. Adds regression tests covering the temporary-key case and the no-image no-op (the first fails before this change and passes after). Fixes #13137 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'Emby.Server.Implementations/Library/ResolverHelper.cs')
0 files changed, 0 insertions, 0 deletions