From 888f30dc10aeb3031d7fcaaa4d7182ea9747e54d Mon Sep 17 00:00:00 2001 From: Mohamad Choupan Date: Wed, 1 Jan 2025 20:27:13 +0330 Subject: [PATCH] fix: tasks result query --- services/tasks/db/db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/tasks/db/db.go b/services/tasks/db/db.go index 835e065f0..cb399f9f6 100644 --- a/services/tasks/db/db.go +++ b/services/tasks/db/db.go @@ -58,7 +58,7 @@ func (db Database) GetTask(id string) (*models.Task, error) { // GetTaskRunResult retrieves a task result by Task ID func (db Database) GetTaskRunResult(id string) (*models.TaskRun, error) { var task *models.TaskRun - tx := db.Orm.Where("id = ?", id). + tx := db.Orm.Where("task_id = ?", id). Order("created_at desc"). First(&task) if tx.Error != nil {