From 896efee38f4363fc66ddff701bdc80edb05f375d Mon Sep 17 00:00:00 2001 From: David Cassany Date: Thu, 28 Jul 2022 16:21:30 +0200 Subject: [PATCH] mend --- pkg/controllers/machineinventoryselector/inventory.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg/controllers/machineinventoryselector/inventory.go b/pkg/controllers/machineinventoryselector/inventory.go index ec7965f09..9bcbbffdd 100644 --- a/pkg/controllers/machineinventoryselector/inventory.go +++ b/pkg/controllers/machineinventoryselector/inventory.go @@ -17,7 +17,6 @@ limitations under the License. package machineinventoryselector import ( - "github.com/pkg/errors" "github.com/rancher/elemental-operator/pkg/apis/elemental.cattle.io/v1beta1" "github.com/rancher/wrangler/pkg/generic" corev1 "k8s.io/api/core/v1" @@ -104,10 +103,8 @@ func (h *handler) inventoryReadyHandler(obj *v1beta1.MachineInventorySelector, s } // if the adoption succeeded the inventory is ready -if err == nil { - v1beta1.InventoryReadyCondition.SetError(&status, "", nil) - return status, nil - } + v1beta1.InventoryReadyCondition.SetError(&status, "", nil) + return status, nil } // adoptMachineInventory attempts to set a controller owner on the inventory