Skip to content

Commit 926a85d

Browse files
ilewinapidbere
and
apidbere
authored
#181 Skipping END and TRANSITION validation for usedForCompensation States (#182)
Signed-off-by: apidbere <apidbere@cisco.com> Co-authored-by: apidbere <apidbere@cisco.com>
1 parent 4afc5f3 commit 926a85d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

model/states_validator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func init() {
2626

2727
func baseStateStructLevelValidationCtx(ctx ValidatorContext, structLevel validator.StructLevel) {
2828
baseState := structLevel.Current().Interface().(BaseState)
29-
if baseState.Type != StateTypeSwitch {
29+
if baseState.Type != StateTypeSwitch && !baseState.UsedForCompensation {
3030
validTransitionAndEnd(structLevel, baseState, baseState.Transition, baseState.End)
3131
}
3232

0 commit comments

Comments
 (0)