diff --git a/Application/PlayLists/Handlers/CreatePlayListCommandHandler.cs b/Application/PlayLists/Handlers/CreatePlayListCommandHandler.cs index c84cc8c..e9f4c94 100644 --- a/Application/PlayLists/Handlers/CreatePlayListCommandHandler.cs +++ b/Application/PlayLists/Handlers/CreatePlayListCommandHandler.cs @@ -23,7 +23,9 @@ namespace Musify.Application.PlayLists.Handlers { public async ValueTask> Handle(CreatePlayListCommand request, CancellationToken cancellationToken) { - var userExists = await database.Users.AnyAsync(u => u.Id == request.UserId, cancellationToken); + var userExists = await database.Users + .AsNoTracking() + .AnyAsync(u => u.Id == request.UserId, cancellationToken); if (!userExists) { logger.LogWarning("User {UserId} not found", request.UserId);