Skip to content

Commit

Permalink
Merge pull request #374 from wking/flatten-if-changed
Browse files Browse the repository at this point in the history
pkg/cvo/sync_worker: Flatten a nested 'if changed'
  • Loading branch information
openshift-merge-robot committed Jun 2, 2020
2 parents e43c031 + 2131612 commit d2cc0d0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/cvo/sync_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,8 @@ func (w *SyncWorker) calculateNext(work *SyncWork) bool {
// the state Update() calculated (to allow us to start in reconciling)
if work.Empty() {
work.State = w.work.State
} else {
if changed {
work.State = payload.UpdatingPayload
}
} else if changed {
work.State = payload.UpdatingPayload
}
// always clear the completed variable if we are not reconciling
if work.State != payload.ReconcilingPayload {
Expand Down

0 comments on commit d2cc0d0

Please sign in to comment.