mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
elasticsearch: metric and pipeline agg setting json encoding fix
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user