Skip to content

Commit 411022e

Browse files
committed
fix: 管理员审核job时编辑普通用户job造成的普通用户job丢失
1 parent 1c2237e commit 411022e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## v2.0.5
44

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

78
## v2.0.4
89

jiacrontabd/srv.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (j *CrontabJob) Edit(args proto.EditCrontabJobArgs, reply *models.CrontabJo
108108
model = model.Omit(
109109
"updated_at", "created_at", "deleted_at",
110110
"created_user_id", "created_username",
111-
"last_cost_time", "last_exec_time",
111+
"last_cost_time", "last_exec_time", "group_id",
112112
"last_exit_status", "process_num",
113113
).Save(&args.Job)
114114
}
@@ -371,7 +371,7 @@ func (j *DaemonJob) Edit(args proto.EditDaemonJobArgs, job *models.DaemonJob) er
371371
model = model.Where("id=? and created_user_id=? and group_id=?", args.Job.ID, args.Job.CreatedUserID, args.GroupID)
372372
}
373373
model = model.Omit(
374-
"updated_at", "created_at", "deleted_at",
374+
"updated_at", "created_at", "deleted_at", "group_id",
375375
"created_user_id", "created_username", "start_at").Save(&args.Job)
376376
}
377377

0 commit comments

Comments
 (0)