remove invalid nil check

This commit is contained in:
CKchen0726 2021-09-13 21:04:31 +08:00
parent dd2d12f6dc
commit 3f16753120

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)
}