Skip to content

Commit

Permalink
Merge pull request #2477 from actiontech/fix-issue2476
Browse files Browse the repository at this point in the history
updates func need use map[string]interface{}
  • Loading branch information
LordofAvernus authored Jul 5, 2024
2 parents 061e660 + dfe3f38 commit c5d6d03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sqle/api/controller/v1/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down Expand Up @@ -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))
}
Expand Down
2 changes: 1 addition & 1 deletion sqle/model/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit c5d6d03

Please sign in to comment.