Skip to content

Commit

Permalink
Remove length check on user tags argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Kita committed Oct 3, 2024
1 parent 36ea233 commit 27c4ad3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions ibm/service/power/resource_ibm_pi_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,7 @@ func resourceIBMPIVolumeCreate(ctx context.Context, d *schema.ResourceData, meta

}
if v, ok := d.GetOk(Arg_UserTags); ok {
if len(flex.FlattenSet(v.(*schema.Set))) > 0 {
body.UserTags = flex.FlattenSet(v.(*schema.Set))
}
body.UserTags = flex.FlattenSet(v.(*schema.Set))
}

client := instance.NewIBMPIVolumeClient(ctx, sess, cloudInstanceID)
Expand Down
4 changes: 1 addition & 3 deletions ibm/service/power/resource_ibm_pi_volume_clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ func resourceIBMPIVolumeCloneCreate(ctx context.Context, d *schema.ResourceData,
}

if v, ok := d.GetOk(Arg_UserTags); ok {
if len(flex.FlattenSet(v.(*schema.Set))) > 0 {
body.UserTags = flex.FlattenSet(v.(*schema.Set))
}
body.UserTags = flex.FlattenSet(v.(*schema.Set))
}

client := instance.NewIBMPICloneVolumeClient(ctx, sess, cloudInstanceID)
Expand Down

0 comments on commit 27c4ad3

Please sign in to comment.