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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -94,7 +94,10 @@ public sealed class BaseItemRepository
/// <inheritdoc /> /// <inheritdoc />
public void DeleteItem(Guid id) 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 context = _dbProvider.CreateDbContext();
using var transaction = context.Database.BeginTransaction(); using var transaction = context.Database.BeginTransaction();