Browse Source

[search] Backward compatibility for dashboards with timelines

Romain Rigaux 10 years ago
parent
commit
3ecb9e19be
1 changed files with 3 additions and 0 deletions
  1. 3 0
      apps/search/src/search/models.py

+ 3 - 0
apps/search/src/search/models.py

@@ -289,6 +289,9 @@ class Collection(models.Model):
       if 'end' in properties and not 'initial_end' in properties:
         properties['initial_end'] = properties['end']
 
+      if facet['widgetType'] == 'histogram-widget' and 'timelineChartType' not in properties:
+        properties['timelineChartType'] = 'bar'
+
       if facet['widgetType'] == 'map-widget' and facet['type'] == 'field':
         facet['type'] = 'pivot'
         properties['facets'] = []