From 6aa724163bcf78275433dacb9fd4deeabe6805c6 Mon Sep 17 00:00:00 2001 From: Pranav Singh Date: Thu, 28 Sep 2023 12:15:28 +0530 Subject: [PATCH] fix adapter issue Signed-off-by: Pranav Singh --- models/meshmodel/registry/host.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/models/meshmodel/registry/host.go b/models/meshmodel/registry/host.go index e8b9524f..b0d9053f 100644 --- a/models/meshmodel/registry/host.go +++ b/models/meshmodel/registry/host.go @@ -1,7 +1,6 @@ package registry import ( - "errors" "fmt" "time" "encoding/json" @@ -60,8 +59,8 @@ func (h *Host) AfterFind(tx *gorm.DB) error { h.IHost = ArtifactHub{} case "kubernetes": h.IHost = Kubernetes{} - default: - return ErrUnknownHost(errors.New("unable to find compatible host for the component")) + default: // do nothing if the host is not pre-unknown. Currently adapters fall into this case. + return nil } return nil }