From 4ee660f31427a81cccaaecd553ab8b0c732e2aab Mon Sep 17 00:00:00 2001 From: Piotr Halama Date: Thu, 19 Dec 2024 10:27:48 +0100 Subject: [PATCH] comment --- internal/modules/list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/modules/list.go b/internal/modules/list.go index 5d1159d3b..92db56c08 100644 --- a/internal/modules/list.go +++ b/internal/modules/list.go @@ -100,6 +100,7 @@ func List(ctx context.Context, client kube.Client) (ModulesList, error) { } func getModuleState(ctx context.Context, client kube.Client, moduleTemplate kyma.ModuleTemplate, kymaCR *kyma.Kyma) (string, error) { + // get state from Kyma CR if it exists if state := getStateFromKymaCR(moduleTemplate, kymaCR); state != "" { return state, nil } @@ -126,7 +127,6 @@ func getModuleState(ctx context.Context, client kube.Client, moduleTemplate kyma } func getStateFromKymaCR(moduleTemplate kyma.ModuleTemplate, kymaCR *kyma.Kyma) string { - // get state from Kyma CR if it exists if kymaCR != nil { for _, module := range kymaCR.Status.Modules { if module.Name == moduleTemplate.Spec.ModuleName {