diff options
| author | Patrick Barron <barronpm@gmail.com> | 2020-08-01 16:20:08 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2020-08-01 16:20:08 -0400 |
| commit | 6f306f0a17571eba7466a5f8bd591498d252e1be (patch) | |
| tree | 8ac85ffec889b0973457d78437ede3a998b683f4 | |
| parent | 9ec787e95488e28708b9698ce2700e90b0f05912 (diff) | |
Minor fixes to ActivityManager
| -rw-r--r-- | Jellyfin.Server.Implementations/Activity/ActivityManager.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs b/Jellyfin.Server.Implementations/Activity/ActivityManager.cs index 65ceee32b..2deefbe81 100644 --- a/Jellyfin.Server.Implementations/Activity/ActivityManager.cs +++ b/Jellyfin.Server.Implementations/Activity/ActivityManager.cs @@ -40,8 +40,9 @@ namespace Jellyfin.Server.Implementations.Activity /// <inheritdoc/> public async Task CreateAsync(ActivityLog entry) { - using var dbContext = _provider.CreateContext(); - await dbContext.ActivityLogs.AddAsync(entry); + await using var dbContext = _provider.CreateContext(); + + dbContext.ActivityLogs.Add(entry); await dbContext.SaveChangesAsync().ConfigureAwait(false); EntryCreated?.Invoke(this, new GenericEventArgs<ActivityLogEntry>(ConvertToOldModel(entry))); |
