1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-23 12:09:01 +00:00

Use helper method

This commit is contained in:
Darren Shepherd
2017-12-13 17:20:31 -07:00
parent b7be5d9d3c
commit 8c0d4bfe2e
2 changed files with 3 additions and 6 deletions

View File

@@ -125,10 +125,8 @@ func (o *objectLifecycleAdapter) create(metadata metav1.Object, obj runtime.Obje
} else if newObj != nil {
_, err = o.objectClient.Update(metadata.GetName(), newObj)
return false, err
} else {
}
_, err = o.objectClient.Update(metadata.GetName(), obj)
return false, err
}
return false, nil
}

View File

@@ -2,7 +2,6 @@ package crd
import (
"context"
"net/http"
"strings"
"time"
@@ -111,7 +110,7 @@ func (c *Store) AddSchemas(ctx context.Context, schemas ...*types.Schema) error
var allSchemas []*types.Schema
for _, schema := range schemas {
if schema.Store != nil || !contains(schema.CollectionMethods, http.MethodGet) {
if schema.Store != nil || !schema.CanList() {
continue
}