Skip to content

Commit

Permalink
Make condition easier to read
Browse files Browse the repository at this point in the history
  • Loading branch information
dtaniwaki committed Mar 13, 2019
1 parent eb01adc commit f62c07b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sensors/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func (sec *sensorExecutionCtx) createResourceObject(resource *v1alpha1.ResourceO
return fmt.Errorf("failed to create resource object. err: %+v", err)
}
sec.log.Info().Str("kind", liveObj.GetKind()).Str("name", liveObj.GetName()).Msg("created object")
if !errors.IsAlreadyExists(err) {
if err == nil || !errors.IsAlreadyExists(err) {
return err
}
liveObj, err = reIf.Get(obj.GetName(), metav1.GetOptions{})
Expand Down

0 comments on commit f62c07b

Please sign in to comment.