Skip to content

Commit

Permalink
fix: update flattenAndSetQuery interface
Browse files Browse the repository at this point in the history
  • Loading branch information
obs-gh-alexlew committed Jan 17, 2024
1 parent 95081ba commit 03d19a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions observe/resource_dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,7 @@ func datasetToResourceData(d *gql.Dataset, data *schema.ResourceData) (diags dia
}

if d.Transform != nil && d.Transform.Current != nil {
stages := make([]*gql.StageQuery, 0)
for _, stage := range d.Transform.Current.Query.Stages {
stages = append(stages, &stage)
}
_, err := flattenAndSetQuery(data, stages, d.Transform.Current.Query.OutputStage)
_, err := flattenAndSetQuery(data, d.Transform.Current.Query.Stages, d.Transform.Current.Query.OutputStage)
if err != nil {
diags = append(diags, diag.FromErr(err)...)
}
Expand Down
6 changes: 1 addition & 5 deletions observe/resource_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -819,11 +819,7 @@ func resourceMonitorRead(ctx context.Context, data *schema.ResourceData, meta in
diags = append(diags, diag.FromErr(err)...)
}

stages := make([]*gql.StageQuery, 0)
for _, stage := range monitor.Query.Stages {
stages = append(stages, &stage)
}
stageIds, err := flattenAndSetQuery(data, stages, monitor.Query.OutputStage)
stageIds, err := flattenAndSetQuery(data, monitor.Query.Stages, monitor.Query.OutputStage)
if err != nil {
diags = append(diags, diag.FromErr(err)...)
}
Expand Down

0 comments on commit 03d19a4

Please sign in to comment.