Update Jellyfin.Server.Implementations/Item/BaseItemRepository.cs

Co-authored-by: Bond-009 <bond.009@outlook.com>
This commit is contained in:
JPVenson
2025-01-19 13:30:31 +01:00
committed by GitHub
parent cd75df6521
commit 7d1a9dcc61

View File

@@ -94,7 +94,10 @@ public sealed class BaseItemRepository
/// <inheritdoc />
public void DeleteItem(Guid id)
{
ArgumentNullException.ThrowIfNull(id.IsEmpty() ? null : id);
if (id.IsEmpty())
{
throw new ArgumentException("Guid can't be empty", nameof(id));
}
using var context = _dbProvider.CreateDbContext();
using var transaction = context.Database.BeginTransaction();