You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2023/11/13 09:46:14 UTC

(incubator-devlake) 01/02: fix: no entities specified, use all entities enabled by default

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

abeizn pushed a commit to branch fix-nil-scope-config
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit fe2edb84facf04ae336c586da874f5e523556979
Author: abeizn <zi...@merico.dev>
AuthorDate: Mon Nov 13 17:45:50 2023 +0800

    fix: no entities specified, use all entities enabled by default
---
 backend/helpers/pluginhelper/api/pipeline_plan.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/backend/helpers/pluginhelper/api/pipeline_plan.go b/backend/helpers/pluginhelper/api/pipeline_plan.go
index 2623765c0..c1138c6db 100644
--- a/backend/helpers/pluginhelper/api/pipeline_plan.go
+++ b/backend/helpers/pluginhelper/api/pipeline_plan.go
@@ -27,8 +27,9 @@ import (
 // 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 subtasks 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 {