Bug Fix: Could not delete Job Queues
This commit is contained in:
@@ -77,7 +77,7 @@ namespace Disco.Services.Jobs.JobQueues
|
|||||||
JobQueue queue = Database.JobQueues.Find(JobQueueId);
|
JobQueue queue = Database.JobQueues.Find(JobQueueId);
|
||||||
|
|
||||||
// Validate: Current Jobs?
|
// 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)
|
if (currentJobCount > 0)
|
||||||
throw new InvalidOperationException("The Job Queue cannot be deleted because it contains jobs");
|
throw new InvalidOperationException("The Job Queue cannot be deleted because it contains jobs");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user