Skip to content

Commit

Permalink
tools/data-api-sdk: fixing an issue where the AvailableServices mod…
Browse files Browse the repository at this point in the history
…el wasn't deserialized correctly
  • Loading branch information
tombuildsstuff committed Feb 14, 2024
1 parent 58948fe commit e83d8c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/data-api-sdk/v1/available_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type GetAvailableServicesResponse struct {
HttpResponse *http.Response

// Model contains a list of the Available Services within this Source Data Type.
Model *map[string]AvailableServiceSummary
Model *GetAvailableServices
}

type GetAvailableServices struct {
Expand Down
2 changes: 1 addition & 1 deletion tools/data-api-sdk/v1/load_all_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (c *Client) LoadAllData(ctx context.Context, serviceNamesToLimitTo []string
result.CommonTypes.Models = commonTypes.Model.Models

c.logger.Debug("Retrieving All Services..")
for serviceName, serviceSummary := range *allServices.Model {
for serviceName, serviceSummary := range allServices.Model.Services {
if len(serviceNamesToLimitTo) > 0 && !filteredServiceListContains(serviceNamesToLimitTo, serviceName) {
c.logger.Trace(fmt.Sprintf("Skipping Service %q since it's not in the list of services to retrieve data from", serviceName))
continue
Expand Down

0 comments on commit e83d8c5

Please sign in to comment.