ソースを参照

[search] Make timeline support timestamps with milliseconds

Romain Rigaux 11 年 前
コミット
9afc8da
1 ファイル変更1 行追加1 行削除
  1. 1 1
      apps/search/src/search/api.py

+ 1 - 1
apps/search/src/search/api.py

@@ -68,7 +68,7 @@ def _guess_range_facet(widget_type, solr_api, collection, facet_field, propertie
         gap = int((end - start) / SLOTS)
       if gap < 1:
         gap = 1
-    elif re.match('\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\dZ', stat_facet['min']):
+    elif re.match('\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d\d?\d?)?Z', stat_facet['min']):
       is_date = True
       stats_min = stat_facet['min']
       stats_max = stat_facet['max']