Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
halamix2 committed Dec 19, 2024
1 parent 0ef8131 commit 4ee660f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/modules/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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 {
Expand Down

0 comments on commit 4ee660f

Please sign in to comment.