diff --git a/sqle/api/controller/v1/workflow.go b/sqle/api/controller/v1/workflow.go index 284244f137..083d450d0e 100644 --- a/sqle/api/controller/v1/workflow.go +++ b/sqle/api/controller/v1/workflow.go @@ -891,7 +891,7 @@ func TerminateMultipleTaskByWorkflowV1(c echo.Context) error { } err = s.UpdateTaskStatusByIDs(terminatingTaskIDs, - map[string]string{"status": model.TaskStatusTerminating}) + map[string]interface{}{"status": model.TaskStatusTerminating}) return c.JSON(http.StatusOK, controller.NewBaseReq(err)) } @@ -955,7 +955,7 @@ func TerminateSingleTaskByWorkflowV1(c echo.Context) error { } err = s.UpdateTaskStatusByIDs([]uint{uint(taskID)}, - map[string]string{"status": model.TaskStatusTerminating}) + map[string]interface{}{"status": model.TaskStatusTerminating}) return c.JSON(http.StatusOK, controller.NewBaseReq(err)) } diff --git a/sqle/model/task.go b/sqle/model/task.go index d72fa7af87..b682982e04 100644 --- a/sqle/model/task.go +++ b/sqle/model/task.go @@ -388,7 +388,7 @@ func (s *Storage) UpdateTaskStatusById(taskId uint, status string) error { } func updateTaskStatusById(tx *gorm.DB, taskId uint, status string) error { - return tx.Model(&Task{}).Where("id = ?", taskId).Updates(map[string]string{ + return tx.Model(&Task{}).Where("id = ?", taskId).Updates(map[string]interface{}{ "status": status, }).Error }