You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ly...@apache.org on 2024/06/06 05:53:47 UTC

(incubator-devlake) branch fix-zentao-0606 created (now 7f3ef8cdc)

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

lynwee pushed a change to branch fix-zentao-0606
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


      at 7f3ef8cdc fix(zentao): fix unexpected data

This branch includes the following new commits:

     new 7f3ef8cdc fix(zentao): fix unexpected data

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(incubator-devlake) 01/01: fix(zentao): fix unexpected data

Posted by ly...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lynwee pushed a commit to branch fix-zentao-0606
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 7f3ef8cdce67eda9d8d4ad1d4f9513cb567760b3
Author: d4x1 <15...@qq.com>
AuthorDate: Thu Jun 6 13:53:32 2024 +0800

    fix(zentao): fix unexpected data
---
 backend/plugins/zentao/api/remote_api.go | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/backend/plugins/zentao/api/remote_api.go b/backend/plugins/zentao/api/remote_api.go
index 32170c899..53c209109 100644
--- a/backend/plugins/zentao/api/remote_api.go
+++ b/backend/plugins/zentao/api/remote_api.go
@@ -69,14 +69,15 @@ func listZentaoRemoteScopes(
 	if err != nil {
 		return
 	}
-	// cnvert to dsmodels.DsRemoteApiScopeListEntry
+	// convert to dsmodels.DsRemoteApiScopeListEntry
 	for _, p := range resBody.Values {
+		tmpProject := p
 		children = append(children, dsmodels.DsRemoteApiScopeListEntry[models.ZentaoProject]{
 			Type:     api.RAS_ENTRY_TYPE_SCOPE,
-			Id:       fmt.Sprintf("%v", p.Id),
-			Name:     p.Name,
-			FullName: p.Name,
-			Data:     &p,
+			Id:       fmt.Sprintf("%v", tmpProject.Id),
+			Name:     tmpProject.Name,
+			FullName: tmpProject.Name,
+			Data:     &tmpProject,
 		})
 	}
 	// next page