Skip to content

Commit

Permalink
Fix errors around null values in state
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskuchin committed Aug 28, 2023
1 parent f2a86f4 commit 6f75566
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions internal/bowtie/client/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ func (c *Client) doRequest(req *http.Request) ([]byte, error) {
return nil, err
}

fmt.Printf("%s", body)

return body, nil
}

Expand Down
2 changes: 1 addition & 1 deletion internal/bowtie/resources/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (r *resourceResource) Read(ctx context.Context, req resource.ReadRequest, r

if len(resource.Ports.Collection.Ports) > 0 {
state.Ports.Range = types.ListNull(types.Int64Type)
collection, diags := types.ListValueFrom(ctx, types.Int64Type, resource.Ports.Collection)
collection, diags := types.ListValueFrom(ctx, types.Int64Type, resource.Ports.Collection.Ports)
resp.Diagnostics.Append(diags...)
if resp.Diagnostics.HasError() {
return
Expand Down

0 comments on commit 6f75566

Please sign in to comment.