Skip to content

Commit

Permalink
fix: 管理员审核job时编辑普通用户job造成的普通用户job丢失
Browse files Browse the repository at this point in the history
  • Loading branch information
iwannay committed Dec 18, 2019
1 parent 1c2237e commit 411022e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## v2.0.5

1. 修复修改job后前一次调度计划不能马上停止
2. 修复管理员审核时编辑普通用户job造成的普通用户job丢失

## v2.0.4

Expand Down
4 changes: 2 additions & 2 deletions jiacrontabd/srv.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (j *CrontabJob) Edit(args proto.EditCrontabJobArgs, reply *models.CrontabJo
model = model.Omit(
"updated_at", "created_at", "deleted_at",
"created_user_id", "created_username",
"last_cost_time", "last_exec_time",
"last_cost_time", "last_exec_time", "group_id",
"last_exit_status", "process_num",
).Save(&args.Job)
}
Expand Down Expand Up @@ -371,7 +371,7 @@ func (j *DaemonJob) Edit(args proto.EditDaemonJobArgs, job *models.DaemonJob) er
model = model.Where("id=? and created_user_id=? and group_id=?", args.Job.ID, args.Job.CreatedUserID, args.GroupID)
}
model = model.Omit(
"updated_at", "created_at", "deleted_at",
"updated_at", "created_at", "deleted_at", "group_id",
"created_user_id", "created_username", "start_at").Save(&args.Job)
}

Expand Down

0 comments on commit 411022e

Please sign in to comment.