From 40a90f6ce8c46a669f41f802bbeb147157512b3d Mon Sep 17 00:00:00 2001 From: "taekyu.kang" Date: Thu, 26 Oct 2023 16:33:02 +0900 Subject: [PATCH] bugfix. fix cloudaccount error when appgroup creating --- internal/usecase/app-group.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/usecase/app-group.go b/internal/usecase/app-group.go index 1595bafa..32e61ce8 100644 --- a/internal/usecase/app-group.go +++ b/internal/usecase/app-group.go @@ -86,10 +86,11 @@ func (u *AppGroupUsecase) Create(ctx context.Context, dto domain.AppGroup) (id d if err != nil { return "", httpErrors.NewBadRequestError(fmt.Errorf("Failed to get cloudAccounts"), "", "") } - tksCloudAccountId = cluster.CloudAccountId.String() + tksCloudAccountId = cluster.CloudAccount.ID.String() + isExist := false for _, ca := range cloudAccounts { - if ca.ID == cluster.CloudAccountId { + if ca.ID == cluster.CloudAccount.ID { // FOR TEST. ADD MAGIC KEYWORD if strings.Contains(ca.Name, domain.CLOUD_ACCOUNT_INCLUSTER) {