Don’t write job description if not set
Original commit: elastic/x-pack-elasticsearch@6e7ff939d3
This commit is contained in:
parent
854dc88cbd
commit
4eda09d24a
|
@ -417,7 +417,9 @@ public class Job extends AbstractDiffable<Job> implements Writeable, ToXContent
|
|||
|
||||
public XContentBuilder doXContentBody(XContentBuilder builder, Params params) throws IOException {
|
||||
builder.field(ID.getPreferredName(), jobId);
|
||||
builder.field(DESCRIPTION.getPreferredName(), description);
|
||||
if (description != null) {
|
||||
builder.field(DESCRIPTION.getPreferredName(), description);
|
||||
}
|
||||
builder.field(CREATE_TIME.getPreferredName(), createTime.getTime());
|
||||
if (finishedTime != null) {
|
||||
builder.field(FINISHED_TIME.getPreferredName(), finishedTime.getTime());
|
||||
|
|
Loading…
Reference in New Issue