[ML] Set createTime if not specified in validate api too
Original commit: elastic/x-pack-elasticsearch@477fb0fc52
This commit is contained in:
parent
f856a79ef3
commit
9da18a14c5
|
@ -68,6 +68,9 @@ extends Action<ValidateJobConfigAction.Request, ValidateJobConfigAction.Response
|
|||
// When jobs are PUT their ID must be supplied in the URL - assume this will
|
||||
// be valid unless an invalid job ID is specified in the JSON to be validated
|
||||
job.setId(job.getId() != null ? job.getId() : "ok");
|
||||
if (job.getCreateTime() == null) {
|
||||
job.setCreateTime(new Date());
|
||||
}
|
||||
return new Request(job.build());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue