From f9a54ca7c731deec44e94e7acfa17a3333a59b66 Mon Sep 17 00:00:00 2001 From: srinandan <13950006+srinandan@users.noreply.github.com> Date: Mon, 11 Mar 2024 10:53:35 -0700 Subject: [PATCH] bug: fixes checks for optional params --- internal/client/integrations/integrations.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/client/integrations/integrations.go b/internal/client/integrations/integrations.go index 358c879..1b49bb1 100644 --- a/internal/client/integrations/integrations.go +++ b/internal/client/integrations/integrations.go @@ -814,7 +814,7 @@ func GetAuthConfigs(integration []byte) (authcfgs []string, err error) { } } authConfigNameParams := taskConfig.Parameters["authConfigName"] - if authConfigNameParams.Key == "authConfigName" { + if authConfigNameParams.Key == "authConfigName" && *authConfigNameParams.Value.StringValue != "" { authConfigUuid, err := authconfigs.Find(*authConfigNameParams.Value.StringValue, "") if err != nil { return nil, fmt.Errorf("unable to find authconfig with name %s", *authConfigNameParams.Value.StringValue) @@ -894,9 +894,11 @@ func GetConnectionsWithRegion(integration []byte) (connections []integrationConn newConnection.CustomConnection = false connections = append(connections, newConnection) } - newConnection := getIntegrationConnection(taskConfig.Parameters["connectionName"], - taskConfig.Parameters["connectionVersion"], iversion.IntegrationConfigParameters) - connections = append(connections, newConnection) + if _, ok := taskConfig.Parameters["connectionName"]; ok { + newConnection := getIntegrationConnection(taskConfig.Parameters["connectionName"], + taskConfig.Parameters["connectionVersion"], iversion.IntegrationConfigParameters) + connections = append(connections, newConnection) + } } } for _, triggerConfig := range iversion.TriggerConfigs {