Skip to content

Commit 6abc852

Browse files
singhvikash11Vikash
and
Vikash
authored
fix: skip approve_if if the evaluation of when condition is false (#150)
Co-authored-by: Vikash <[email protected]>
1 parent 8f9898f commit 6abc852

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/approval/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func (s *Service) AdvanceApproval(appeal *domain.Appeal) error {
7878
}
7979
}
8080

81-
if stepConfig.Strategy == domain.ApprovalStepStrategyAuto {
81+
if approval.Status != domain.ApprovalStatusSkipped && stepConfig.Strategy == domain.ApprovalStepStrategyAuto {
8282
v, err := evaluator.Expression(stepConfig.ApproveIf).EvaluateWithVars(map[string]interface{}{
8383
"appeal": appealMap,
8484
})

0 commit comments

Comments
 (0)