Bug Fix: Could not delete Job Queues
This commit is contained in:
1 parent
3bc8b63700
commit
eea71e6eb0
1 file changed
+1
-1
@@ -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");
|
||||
|
||||
|
||||
Reference in new issue
Block a user