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

klesh pushed a commit to branch kw-5519-dshelper
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 047145f32ec7230973631a17dc170f2ba8442f1d
Author: Klesh Wong <[email protected]>
AuthorDate: Fri Dec 1 13:54:04 2023 +0800

    fix: config-ui is expecting the parentId to be null for the search remote 
api
---
 backend/helpers/pluginhelper/api/ds_remote_api_scope_search_helper.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/backend/helpers/pluginhelper/api/ds_remote_api_scope_search_helper.go 
b/backend/helpers/pluginhelper/api/ds_remote_api_scope_search_helper.go
index ca41c20d0..b5cc67367 100644
--- a/backend/helpers/pluginhelper/api/ds_remote_api_scope_search_helper.go
+++ b/backend/helpers/pluginhelper/api/ds_remote_api_scope_search_helper.go
@@ -66,6 +66,10 @@ func (rss *DsRemoteApiScopeSearchHelper[C, S]) Get(input 
*plugin.ApiResourceInpu
        if err != nil {
                return nil, err
        }
+       // the config-ui is expecting the parent id to be null
+       for i := range scopes {
+               scopes[i].ParentId = nil
+       }
        return &plugin.ApiResourceOutput{
                Body: map[string]interface{}{
                        "children": scopes,

Reply via email to