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

zhangliang2022 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new e1f5424b fix: handle the situation when slice is empty (#3638)
e1f5424b is described below

commit e1f5424b994718842cb58834b41c459ec784c3f9
Author: Chaojie Yan <[email protected]>
AuthorDate: Wed Nov 2 19:37:59 2022 +0800

    fix: handle the situation when slice is empty (#3638)
    
    Co-authored-by: Chaojie Yan <[email protected]>
---
 plugins/dbt/tasks/convertor.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/dbt/tasks/convertor.go b/plugins/dbt/tasks/convertor.go
index 7941caf7..c605efef 100644
--- a/plugins/dbt/tasks/convertor.go
+++ b/plugins/dbt/tasks/convertor.go
@@ -119,7 +119,7 @@ func DbtConverter(taskCtx core.SubTaskContext) errors.Error 
{
                dbtExecParams = append(dbtExecParams, "--vars")
                dbtExecParams = append(dbtExecParams, string(jsonProjectVars))
        }
-       if models != nil {
+       if len(models) > 0 {
                dbtExecParams = append(dbtExecParams, "--select")
                dbtExecParams = append(dbtExecParams, models...)
        }

Reply via email to