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:59:55 UTC
(incubator-devlake) branch release-v1.0 updated: fix(zentao): fix unexpected data (#7578) (#7579)
This is an automated email from the ASF dual-hosted git repository.
lynwee pushed a commit to branch release-v1.0
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/release-v1.0 by this push:
new c4ed97434 fix(zentao): fix unexpected data (#7578) (#7579)
c4ed97434 is described below
commit c4ed97434a46b5253764aa63ca473d985d8d4d32
Author: github-actions[bot] <41...@users.noreply.github.com>
AuthorDate: Thu Jun 6 13:59:51 2024 +0800
fix(zentao): fix unexpected data (#7578) (#7579)
Co-authored-by: Lynwee <li...@merico.dev>
---
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