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

abeizn pushed a commit to branch release-v0.20
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/release-v0.20 by this push:
     new fcef4bf3d fix: get pipline tasks details panic (#6985)
fcef4bf3d is described below

commit fcef4bf3d580cdec5232d20547c1c14b6098e135
Author: abeizn <zikuan...@merico.dev>
AuthorDate: Wed Feb 21 14:58:31 2024 +0800

    fix: get pipline tasks details panic (#6985)
---
 backend/server/services/task.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/backend/server/services/task.go b/backend/server/services/task.go
index 362414557..e1e229f3c 100644
--- a/backend/server/services/task.go
+++ b/backend/server/services/task.go
@@ -111,6 +111,9 @@ func GetTasks(query *TaskQuery) ([]*models.Task, int64, 
errors.Error) {
 // GetTasksWithLastStatus returns task list of the pipeline, only the most 
recently tasks would be returned
 // TODO: adopts GetLatestTasksOfPipeline
 func GetTasksWithLastStatus(pipelineId uint64, tx dal.Dal) ([]*models.Task, 
errors.Error) {
+       if tx == nil {
+               tx = db
+       }
        var tasks []*models.Task
        err := tx.All(&tasks, dal.Where("pipeline_id = ?", pipelineId), 
dal.Orderby("id DESC"))
        if err != nil {

Reply via email to