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

abeizn 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 30f6ad9e fix: the GetBlueprintPipelines pending add status filter 
(#3621)
30f6ad9e is described below

commit 30f6ad9ed062816fc4bf125b976928e904b3f7db
Author: abeizn <[email protected]>
AuthorDate: Mon Oct 31 19:55:24 2022 +0800

    fix: the GetBlueprintPipelines pending add status filter (#3621)
    
    * feat: the GetBlueprintPipelines interface support page... params
    
    * feat: the GetBlueprintPipelines interface support page... params
    
    * fix: the GetBlueprintPipelines pending add status filter
    
    * fix: the GetBlueprintPipelines pending add status filter
---
 services/pipeline_helper.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/services/pipeline_helper.go b/services/pipeline_helper.go
index c5c625e7..26661d46 100644
--- a/services/pipeline_helper.go
+++ b/services/pipeline_helper.go
@@ -20,6 +20,7 @@ package services
 import (
        "encoding/json"
        goerror "errors"
+
        "github.com/apache/incubator-devlake/config"
        "github.com/apache/incubator-devlake/errors"
        "github.com/apache/incubator-devlake/models"
@@ -106,7 +107,7 @@ func GetDbPipelines(query *PipelineQuery) 
([]*models.DbPipeline, int64, errors.E
                db = db.Where("status = ?", query.Status)
        }
        if query.Pending > 0 {
-               db = db.Where("finished_at is null")
+               db = db.Where("finished_at is null and status != ?", 
"TASK_FAILED")
        }
        var count int64
        err := db.Count(&count).Error

Reply via email to