mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Merge pull request #104965 from CKchen0726/invalid_nil_check
remove redundant nil check
This commit is contained in:
commit
ed40a89f2e
@ -195,7 +195,7 @@ func createHandler(r rest.NamedCreater, scope *RequestScope, admit admission.Int
|
|||||||
|
|
||||||
code := http.StatusCreated
|
code := http.StatusCreated
|
||||||
status, ok := result.(*metav1.Status)
|
status, ok := result.(*metav1.Status)
|
||||||
if ok && err == nil && status.Code == 0 {
|
if ok && status.Code == 0 {
|
||||||
status.Code = int32(code)
|
status.Code = int32(code)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user