Skip to content

Commit

Permalink
check for nil operationgroup on product (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
theganyo authored Jun 27, 2023
1 parent ce74d66 commit 26a8b22
Show file tree
Hide file tree
Showing 2 changed files with 9,111 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmd/registry-connect/discover/apigee/products/products.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,11 @@ func addDeployments(ctx context.Context, client apigee.Client, apisByProxyName m

func boundProxies(prod *api.GoogleCloudApigeeV1ApiProduct) []string {
proxies := prod.Proxies
for _, oc := range prod.OperationGroup.OperationConfigs {
if oc.ApiSource != "" {
proxies = append(proxies, oc.ApiSource)
if prod.OperationGroup != nil {
for _, oc := range prod.OperationGroup.OperationConfigs {
if oc.ApiSource != "" {
proxies = append(proxies, oc.ApiSource)
}
}
}
return proxies
Expand Down
Loading

0 comments on commit 26a8b22

Please sign in to comment.