Skip to content

Commit

Permalink
fix: can not add connection to bp (apache#5658)
Browse files Browse the repository at this point in the history
  • Loading branch information
mindlesscloud committed Jul 11, 2023
1 parent 2be936a commit d14773c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion backend/plugins/zentao/api/blueprint_V200_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func TestMakeDataSourcePipelinePlanV200(t *testing.T) {
mockBasicRes(t)

bs := &plugin.BlueprintScopeV200{
Id: "project/1",
Id: "1",
}
/*bs2 := &plugin.BlueprintScopeV200{
Id: "product/1",
Expand Down
7 changes: 1 addition & 6 deletions backend/plugins/zentao/api/blueprint_v200.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ limitations under the License.
package api

import (
"strings"
"time"

"github.com/apache/incubator-devlake/core/errors"
Expand Down Expand Up @@ -67,13 +66,9 @@ func makePipelinePlanV200(
ConnectionId: connection.ID,
}

//scopeType := strings.Split(bpScope.Id, `/`)[0]
scopeId := strings.Split(bpScope.Id, `/`)[1]

var entities []string

//if scopeType == `project` {
project, scopeConfig, err := projectScopeHelper.DbHelper().GetScopeAndConfig(connection.ID, scopeId)
project, scopeConfig, err := projectScopeHelper.DbHelper().GetScopeAndConfig(connection.ID, bpScope.Id)
if err != nil {
return nil, nil, err
}
Expand Down

0 comments on commit d14773c

Please sign in to comment.