Skip to content

Commit

Permalink
move error check to make github happy
Browse files Browse the repository at this point in the history
  • Loading branch information
carchi8py committed Nov 13, 2023
1 parent 153f8bb commit 9df6464
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/provider/storage_volume_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,13 +387,15 @@ func (r *StorageVolumeResource) Read(ctx context.Context, req resource.ReadReque
var response *interfaces.StorageVolumeGetDataModelONTAP
if data.ID.ValueString() == "" {
response, err = interfaces.GetStorageVolumeByName(errorHandler, *client, data.Name.ValueString(), data.SVMName.ValueString())
if err != nil {
return
}
data.ID = types.StringValue(response.UUID)
} else {
response, err = interfaces.GetStorageVolume(errorHandler, *client, data.ID.ValueString())
}

if err != nil {
return
if err != nil {
return
}
}

tflog.Debug(ctx, fmt.Sprintf("read a volume resource: %#v", data))
Expand Down

0 comments on commit 9df6464

Please sign in to comment.