@@ -65,7 +65,9 @@ def index(request: Request):
6565 try :
6666
6767 df = get_data (
68- app .state .specs_enabled [batch_name ], max_n = DEFAULT_ALERT_MAX_N
68+ app .state .specs_enabled [batch_name ],
69+ max_n = DEFAULT_ALERT_MAX_N ,
70+ ensure_timestamp = True
6971 )
7072
7173 except Exception as e :
@@ -179,7 +181,9 @@ def get_batch_view(batch_name: str, session, initial_load: int = DEFAULT_LOAD_N_
179181 # First, ensure we have the data and stats calculated
180182 if batch_name not in app .state .df_cache :
181183 app .state .df_cache [batch_name ] = get_data (
182- app .state .specs_enabled [batch_name ], max_n = DEFAULT_ALERT_MAX_N
184+ app .state .specs_enabled [batch_name ],
185+ max_n = DEFAULT_ALERT_MAX_N ,
186+ ensure_timestamp = True
183187 )
184188 app .state .calculate_metric_stats (batch_name )
185189 elif batch_name not in app .state .stats_cache :
@@ -376,7 +380,9 @@ def post(batch_name: str, alert_max_n: int = DEFAULT_ALERT_MAX_N, session=None):
376380 app .state .clear_batch_cache (batch_name )
377381
378382 app .state .df_cache [batch_name ] = get_data (
379- app .state .specs_enabled [batch_name ], max_n = alert_max_n
383+ app .state .specs_enabled [batch_name ],
384+ max_n = alert_max_n ,
385+ ensure_timestamp = True
380386 )
381387 app .state .calculate_metric_stats (batch_name )
382388
0 commit comments