From c1f424789ed1d22eb7f99b7a6e883352905b2ddd Mon Sep 17 00:00:00 2001 From: Tomer Heber Date: Tue, 19 Nov 2024 17:28:00 -0600 Subject: [PATCH] pagination for teams --- client/team.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/team.go b/client/team.go index b584740c..711d7a1c 100644 --- a/client/team.go +++ b/client/team.go @@ -101,7 +101,7 @@ func (client *ApiClient) GetTeams(params map[string]string) ([]Team, error) { teams = append(teams, res.Teams...) nextPageKey := res.NextPageKey - if nextPageKey == "" { + if nextPageKey == "" || len(res.Teams) == 0 { break }