Skip to content

Commit

Permalink
Merge pull request #213 from GoogleCloudPlatform/issue212
Browse files Browse the repository at this point in the history
bug: fixes checks for optional params
  • Loading branch information
ssvaidyanathan authored Mar 11, 2024
2 parents 207bfac + f9a54ca commit d374791
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/client/integrations/integrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit d374791

Please sign in to comment.