diff --git a/Disco.Services/Jobs/JobQueues/JobQueueService.cs b/Disco.Services/Jobs/JobQueues/JobQueueService.cs index cc6e4717..6d097a56 100644 --- a/Disco.Services/Jobs/JobQueues/JobQueueService.cs +++ b/Disco.Services/Jobs/JobQueues/JobQueueService.cs @@ -77,7 +77,7 @@ namespace Disco.Services.Jobs.JobQueues JobQueue queue = Database.JobQueues.Find(JobQueueId); // Validate: Current Jobs? - int currentJobCount = Database.JobQueueJobs.Count(jqj => jqj.JobQueueId == queue.Id && jqj.RemovedDate.HasValue); + int currentJobCount = Database.JobQueueJobs.Count(jqj => jqj.JobQueueId == queue.Id && !jqj.RemovedDate.HasValue); if (currentJobCount > 0) throw new InvalidOperationException("The Job Queue cannot be deleted because it contains jobs");