From a027ced4f2026a825e3cc9d74d12209158b54672 Mon Sep 17 00:00:00 2001 From: Ean Garcia-Rollings Date: Thu, 28 Sep 2023 14:31:26 -0400 Subject: [PATCH 1/4] Adding missing check for group in paginated results --- VERSION | 2 +- tableau/group.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 9789c4c..ceddfb2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.14 +0.0.15 diff --git a/tableau/group.go b/tableau/group.go index 2f710d6..2ad816d 100644 --- a/tableau/group.go +++ b/tableau/group.go @@ -81,6 +81,12 @@ func (c *Client) GetGroup(groupID string) (*Group, error) { if err != nil { return nil, err } + // check if we found the group in this page + for i, group := range groupListResponse.GroupsResponse.Groups { + if group.ID == groupID { + return &groupListResponse.GroupsResponse.Groups[i], nil + } + } } return nil, fmt.Errorf("Did not find group ID %s", groupID) From 12de8cf959b199b142294d66a5b961b95acf811d Mon Sep 17 00:00:00 2001 From: Ean Garcia-Rollings Date: Fri, 29 Sep 2023 07:13:10 -0400 Subject: [PATCH 2/4] Adding paginated check on GroupUser objects --- tableau/group_user.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tableau/group_user.go b/tableau/group_user.go index 5430e73..f289321 100644 --- a/tableau/group_user.go +++ b/tableau/group_user.go @@ -64,6 +64,12 @@ func (c *Client) GetGroupUser(groupID, userID string) (*User, error) { if err != nil { return nil, err } + // Check this page of data for the GroupUser match + for i, user := range groupUsersListResponse.GroupUsersResponse.Users { + if user.ID == userID { + return &groupUsersListResponse.GroupUsersResponse.Users[i], nil + } + } } return nil, fmt.Errorf("Did not find user ID %s in group ID %s", userID, groupID) From 8f84ebc6f696e7595549f18b8616555aacba5b78 Mon Sep 17 00:00:00 2001 From: Ean Garcia-Rollings Date: Fri, 29 Sep 2023 07:16:43 -0400 Subject: [PATCH 3/4] Adding paginated check on Project objects --- tableau/project.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tableau/project.go b/tableau/project.go index fefc8bc..1a5125c 100644 --- a/tableau/project.go +++ b/tableau/project.go @@ -76,6 +76,12 @@ func (c *Client) GetProject(projectID string) (*Project, error) { if err != nil { return nil, err } + // Check page for project match + for i, project := range projectListResponse.ProjectsResponse.Projects { + if project.ID == projectID { + return &projectListResponse.ProjectsResponse.Projects[i], nil + } + } } return nil, fmt.Errorf("Did not find project ID %s", projectID) From 504e27ef19aecee3101bccae4d447729a5782b20 Mon Sep 17 00:00:00 2001 From: Ean Garcia-Rollings Date: Fri, 29 Sep 2023 07:46:15 -0400 Subject: [PATCH 4/4] Matching VERSION of next release --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index ceddfb2..cd23180 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.15 +0.0.17