Skip to content

Commit

Permalink
fix exception
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdulRahman AlHamali committed Mar 25, 2021
1 parent 2d0b6f6 commit 4dc138e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ class TaskController {
@RequestMapping(value = "/pipelines/{id}/stages/{stageId}/ignoreFailure", method = RequestMethod.PUT)
PipelineExecution ignoreFailureOfPipelineStage(
@PathVariable String id, @PathVariable String stageId) {
pipeline = executionRepository.retrieve(PIPELINE, id)
stage = pipeline.stageById(stageId)
def pipeline = executionRepository.retrieve(PIPELINE, id)
def stage = pipeline.stageById(stageId)
if (!(boolean) stage.context.getCurrentOnly("allowIgnoreFailure", false)) {
throw AccessDeniedException("Stage does not allow ignoreFailure action")
}
Expand Down

0 comments on commit 4dc138e

Please sign in to comment.