From bf551f579c330053e7fa7dd91954e825dbc22da3 Mon Sep 17 00:00:00 2001 From: Mars Hall Date: Wed, 11 Oct 2023 08:49:37 -0700 Subject: [PATCH] Fix creating team collaborators when some are already collaborators (#380) --- heroku/resource_heroku_team_collaborator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heroku/resource_heroku_team_collaborator.go b/heroku/resource_heroku_team_collaborator.go index b29c66f2..e39c01b3 100644 --- a/heroku/resource_heroku_team_collaborator.go +++ b/heroku/resource_heroku_team_collaborator.go @@ -127,7 +127,7 @@ func resourceHerokuTeamCollaboratorCreate(d *schema.ResourceData, meta interface if strings.Contains(strings.ToLower(createErr.Error()), "is already a collaborator on app") { // Loop through all collaborators on the app to get the collaborator ID collaborators, listErr := client.TeamAppCollaboratorList(context.TODO(), appID, - &heroku.ListRange{Max: 1000, Descending: true}) + &heroku.ListRange{Field: "email", Max: 1000}) if listErr != nil { return listErr }