From eea71e6eb0461d4ac0c29ace43acac13f08a7303 Mon Sep 17 00:00:00 2001 From: Gary Sharp Date: Tue, 4 Feb 2014 15:03:19 +1100 Subject: [PATCH] Bug Fix: Could not delete Job Queues --- Disco.Services/Jobs/JobQueues/JobQueueService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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");