elasticsearch: metric and pipeline agg setting json encoding fix

pull/11380/head
Marcus Efraimsson 7 years ago
parent 4436b8da12
commit 688f5b830c
No known key found for this signature in database
GPG Key ID: EBFE0FB04612DD4A
  1. 8
      pkg/tsdb/elasticsearch/client/models.go

@ -278,7 +278,9 @@ func (a *MetricAggregation) MarshalJSON() ([]byte, error) {
}
for k, v := range a.Settings {
root[k] = v
if k != "" && v != nil {
root[k] = v
}
}
return json.Marshal(root)
@ -297,7 +299,9 @@ func (a *PipelineAggregation) MarshalJSON() ([]byte, error) {
}
for k, v := range a.Settings {
root[k] = v
if k != "" && v != nil {
root[k] = v
}
}
return json.Marshal(root)

Loading…
Cancel
Save