You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by mi...@apache.org on 2024/04/18 09:15:40 UTC

(incubator-devlake) branch main updated: fix: the parentIds in the first page of tapd remote scopes should be nil (#7347)

This is an automated email from the ASF dual-hosted git repository.

mintsweet pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 55fd2cc95 fix: the parentIds in the first page of tapd remote scopes should be nil (#7347)
55fd2cc95 is described below

commit 55fd2cc95552bdcc3c2f7e7a162438877e919962
Author: Klesh Wong <zh...@merico.dev>
AuthorDate: Thu Apr 18 17:15:33 2024 +0800

    fix: the parentIds in the first page of tapd remote scopes should be nil (#7347)
---
 backend/plugins/tapd/api/remote_api.go | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/backend/plugins/tapd/api/remote_api.go b/backend/plugins/tapd/api/remote_api.go
index a22c2fd94..cce9bcf75 100644
--- a/backend/plugins/tapd/api/remote_api.go
+++ b/backend/plugins/tapd/api/remote_api.go
@@ -94,8 +94,12 @@ func listTapdRemoteScopes(
 		}
 	}
 	generateFullNames(root, "")
-	// select the current group
+	// failback to the root
 	if current == nil {
+		// the parentId in the first page is always nil
+		for _, child := range root.children {
+			child.entry.ParentId = nil
+		}
 		current = root
 	}
 	// sort children