diff --git a/CHANGELOG.md b/CHANGELOG.md index 321f7ce5..63813dc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## v2.0.5 1. 修复修改job后前一次调度计划不能马上停止 +2. 修复管理员审核时编辑普通用户job造成的普通用户job丢失 ## v2.0.4 diff --git a/jiacrontabd/srv.go b/jiacrontabd/srv.go index 7c66b3ce..eeac08be 100644 --- a/jiacrontabd/srv.go +++ b/jiacrontabd/srv.go @@ -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) } @@ -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) }