Skip to content

Commit

Permalink
Use helper method
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud committed Dec 14, 2017
1 parent 23d630f commit b6df901
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions lifecycle/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
_, err = o.objectClient.Update(metadata.GetName(), obj)
return false, err
}
3 changes: 1 addition & 2 deletions store/crd/crd_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package crd

import (
"context"
"net/http"
"strings"
"time"

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit b6df901

Please sign in to comment.