Merge pull request #104965 from CKchen0726/invalid_nil_check

remove redundant nil check
This commit is contained in:
Kubernetes Prow Robot 2021-09-29 19:44:07 -07:00 committed by GitHub
commit ed40a89f2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,7 +195,7 @@ func createHandler(r rest.NamedCreater, scope *RequestScope, admit admission.Int
code := http.StatusCreated
status, ok := result.(*metav1.Status)
if ok && err == nil && status.Code == 0 {
if ok && status.Code == 0 {
status.Code = int32(code)
}