Skip to content

The Free Software Media System - Server Backend & API

Don't AddAsync

Bond_009941f326c0b78
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs
index 5d72ff9382..a0dd2a6b38 100644
--- a/Jellyfin.Server.Implementations/Users/UserManager.cs
+++ b/Jellyfin.Server.Implementations/Users/UserManager.cs
@@ -216,7 +216,7 @@ namespace Jellyfin.Server.Implementations.Users
var newUser = await CreateUserInternalAsync(name, dbContext).ConfigureAwait(false);
- await dbContext.Users.AddAsync(newUser).ConfigureAwait(false);
+ dbContext.Users.Add(newUser);
await dbContext.SaveChangesAsync().ConfigureAwait(false);
OnUserCreated?.Invoke(this, new GenericEventArgs<User>(newUser));
@@ -608,7 +608,7 @@ namespace Jellyfin.Server.Implementations.Users
newUser.SetPermission(PermissionKind.EnableContentDeletion, true);
newUser.SetPermission(PermissionKind.EnableRemoteControlOfOtherUsers, true);
- await dbContext.Users.AddAsync(newUser).ConfigureAwait(false);
+ dbContext.Users.Add(newUser);
await dbContext.SaveChangesAsync().ConfigureAwait(false);
}