Skip to content

Commit

Permalink
Merge pull request #42 from bmrvilela/master
Browse files Browse the repository at this point in the history
Improvement to ProjectHasScanRunning
  • Loading branch information
portilha authored Feb 7, 2025
2 parents 0568c23 + f17038d commit 88cda0d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Checkmarx.API/CxClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2362,7 +2362,9 @@ public Scan GetScanById(long scanId)

public bool ProjectHasScanRunning(long projectId)
{
return GetScansQueue(projectId).Any(x => !x.CompletedOn.HasValue);
return GetScansQueue(projectId).Any(x => x.Stage.Value != "Finished" &&
x.Stage.Value != "Failed" &&
x.Stage.Value != "Canceled");
}

public ICollection<ScanQueue> GetScansQueue(long? projectId = null)
Expand Down

0 comments on commit 88cda0d

Please sign in to comment.