aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Lavado <anthony@lavado.ca>2020-08-04 17:34:56 -0700
committerGitHub <noreply@github.com>2020-08-04 17:34:56 -0700
commitc2799fe4d3bd718f4d55b425c1bb8d7b5b53b8a6 (patch)
tree154b3a65f2a0067d2086d0893d4195995240cd1b
parentc5bc046c4000d21d681436d86b9296d4a772136d (diff)
parent6f306f0a17571eba7466a5f8bd591498d252e1be (diff)
Merge pull request #3784 from barronpm/add-sync
Minor fixes to ActivityManager
-rw-r--r--Jellyfin.Server.Implementations/Activity/ActivityManager.cs5
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)));