Skip to content

Commit

Permalink
Merge pull request #131 from ibuildthecloud/master
Browse files Browse the repository at this point in the history
Don't blank out object on failed status update
  • Loading branch information
ibuildthecloud authored Oct 2, 2020
2 parents 470f621 + 9465df8 commit c4a5631
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/controller-gen/generators/type_go.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,13 @@ func (a *{{.lowerName}}StatusHandler) sync(key string, obj *{{.version}}.{{.type
var newErr error
obj.Status = newStatus
obj, newErr = a.client.UpdateStatus(obj)
newObj, newErr := a.client.UpdateStatus(obj)
if err == nil {
err = newErr
}
if newErr == nil {
obj = newObj
}
}
return obj, err
}
Expand Down

0 comments on commit c4a5631

Please sign in to comment.