fix: no entities specified, use all entities enabled by default (#6450)
* fix: no entities specified, use all entities enabled by default
* fix: no entities specified, use all entities enabled by default
diff --git a/backend/helpers/pluginhelper/api/pipeline_plan.go b/backend/helpers/pluginhelper/api/pipeline_plan.go
index 2623765..ce920b1 100644
--- a/backend/helpers/pluginhelper/api/pipeline_plan.go
+++ b/backend/helpers/pluginhelper/api/pipeline_plan.go
@@ -19,6 +19,7 @@
import (
"fmt"
+
"github.com/apache/incubator-devlake/core/errors"
plugin "github.com/apache/incubator-devlake/core/plugin"
"github.com/apache/incubator-devlake/core/utils"
@@ -27,8 +28,9 @@
// MakePipelinePlanSubtasks generates subtasks list based on sub-task meta information and entities wanted by user
func MakePipelinePlanSubtasks(subtaskMetas []plugin.SubTaskMeta, entities []string) ([]string, errors.Error) {
subtasks := make([]string, 0)
+ // if no entities specified, use all entities enabled by default
if len(entities) == 0 {
- return subtasks, nil
+ entities = plugin.DOMAIN_TYPES
}
wanted := make(map[string]bool, len(entities))
for _, entity := range entities {