Skip to content

Commit

Permalink
Fix Start validation
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Nayak <[email protected]>
  • Loading branch information
rohit-nayak-ps committed Dec 26, 2020
1 parent 9dcd560 commit 2a7a492
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go/vt/wrangler/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ func (vrw *VReplicationWorkflow) stateAsString(ws *workflowState) string {
// Start initiates a workflow
func (vrw *VReplicationWorkflow) Start() error {
var err error
if !vrw.Exists() {
return fmt.Errorf("workflow now found")
if vrw.Exists() {
return fmt.Errorf("workflow already exists found")
}
if vrw.CachedState() != WorkflowStateNotStarted {
return fmt.Errorf("workflow has already been started, state is %s", vrw.CachedState())
Expand Down

0 comments on commit 2a7a492

Please sign in to comment.