浏览代码

Merge pull request #451 from compressed/hook_task_upd

update specific hook_task, not all
无闻 10 年之前
父节点
当前提交
e004ec08e9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      models/webhook.go

+ 1 - 1
models/webhook.go

@@ -230,7 +230,7 @@ func CreateHookTask(t *HookTask) error {
 
 
 // UpdateHookTask updates information of hook task.
 // UpdateHookTask updates information of hook task.
 func UpdateHookTask(t *HookTask) error {
 func UpdateHookTask(t *HookTask) error {
-	_, err := x.AllCols().Update(t)
+	_, err := x.Id(t.Id).AllCols().Update(t)
 	return err
 	return err
 }
 }