Skip to content

Commit

Permalink
Remove the NextState check that is empty. Already been checked as r…
Browse files Browse the repository at this point in the history
…equired in the `Transition` struct field.

Signed-off-by: André R. de Miranda <andre@galgo.tech>
  • Loading branch information
ribeiromiranda committed Mar 10, 2023
1 parent e4b7b0e commit 03e4dc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/util_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
)

func validTransitionAndEnd(structLevel validator.StructLevel, field interface{}, transition *Transition, end *End) {
hasTransition := transition != nil && transition.NextState != ""
hasTransition := transition != nil
isEnd := end != nil && (end.Terminate || end.ContinueAs != nil || len(end.ProduceEvents) > 0) // TODO: check the spec continueAs/produceEvents to see how it influences the end

if !hasTransition && !isEnd {
Expand Down

0 comments on commit 03e4dc8

Please sign in to comment.