Skip to content

Commit

Permalink
Fix crash when creating new teams (opsgenie#321)
Browse files Browse the repository at this point in the history
This is a follow-up of opsgenie#298, which also broke the creation of new teams.

Co-authored-by: Muhammad Saiful Islam <[email protected]>

Co-authored-by: Muhammad Saiful Islam <[email protected]>
  • Loading branch information
multani and saifulwebid authored Aug 15, 2022
1 parent 66ad470 commit a861b2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opsgenie/resource_opsgenie_team.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func resourceOpsGenieTeamCreate(d *schema.ResourceData, meta interface{}) error
Description: description,
}

if len(d.Get("member").([]interface{})) > 0 && !d.Get("ignore_members").(bool) {
if d.Get("member").(*schema.Set).Len() > 0 && !d.Get("ignore_members").(bool) {
createRequest.Members = expandOpsGenieTeamMembers(d)
}

Expand Down

0 comments on commit a861b2e

Please sign in to comment.