Minor fixes to ActivityManager

This commit is contained in:
Patrick Barron 2020-08-01 16:20:08 -04:00
parent 9ec787e954
commit 6f306f0a17

View File

@ -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)));