mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-13 07:29:39 +00:00
Citadel: Fix range aggregations
This commit is contained in:
parent
967e146344
commit
f1a0da71e0
@ -156,7 +156,8 @@ def format_aggregations(aggregations, filters):
|
||||
'label': str(filters[key]),
|
||||
'buckets': [{
|
||||
'key': bucket['most_common']['buckets'][0]['key'] if 'most_common' in bucket else bucket['key'],
|
||||
'count': bucket['doc_count']
|
||||
'count': bucket['doc_count'],
|
||||
**{k: v for k, v in bucket.items() if k in ('from_as_string', 'to_as_string')}
|
||||
} for bucket in value['buckets']]
|
||||
}
|
||||
for key, value in _flatten(aggregations)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user