Skip to content

Commit

Permalink
Remove length check from 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 c760031 commit ab5e103
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_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,7 @@ func resourceIBMPINetworkCreate(ctx context.Context, d *schema.ResourceData, met
}
}
if tags, ok := d.GetOk(Arg_UserTags); ok {
if len(flex.FlattenSet(tags.(*schema.Set))) > 0 {
body.UserTags = flex.FlattenSet(tags.(*schema.Set))
}
body.UserTags = flex.FlattenSet(tags.(*schema.Set))
}
if v, ok := d.GetOk(helpers.PINetworkJumbo); ok {
body.Jumbo = v.(bool)
Expand Down
4 changes: 1 addition & 3 deletions ibm/service/power/resource_ibm_pi_network_port_attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ func resourceIBMPINetworkPortAttachCreate(ctx context.Context, d *schema.Resourc
nwportBody.IPAddress = ipaddress
}
if tags, ok := d.GetOk(Arg_UserTags); ok {
if len(flex.FlattenSet(tags.(*schema.Set))) > 0 {
nwportBody.UserTags = flex.FlattenSet(tags.(*schema.Set))
}
nwportBody.UserTags = flex.FlattenSet(tags.(*schema.Set))
}
nwportattachBody := &models.NetworkPortUpdate{
Description: &description,
Expand Down

0 comments on commit ab5e103

Please sign in to comment.