From 2c8adf13338a0d0850bf34394efc22f037a23667 Mon Sep 17 00:00:00 2001 From: TeachMeTW Date: Tue, 5 Nov 2024 15:43:08 -0800 Subject: [PATCH] Uniformed uuid check in both dwell filters --- .../trip_segmentation_methods/dwell_segmentation_time_filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emission/analysis/intake/segmentation/trip_segmentation_methods/dwell_segmentation_time_filter.py b/emission/analysis/intake/segmentation/trip_segmentation_methods/dwell_segmentation_time_filter.py index 6fc047f4e..c2e3a5203 100644 --- a/emission/analysis/intake/segmentation/trip_segmentation_methods/dwell_segmentation_time_filter.py +++ b/emission/analysis/intake/segmentation/trip_segmentation_methods/dwell_segmentation_time_filter.py @@ -68,7 +68,7 @@ def segment_into_trips(self, timeseries, time_query): # Timer for fetching filtered location points with ect.Timer() as t_get_filtered_points_pre_ts_diff_df: filtered_points_pre_ts_diff_df = timeseries.get_data_df("background/filtered_location", time_query) - user_id = self.filtered_pointsdf.iloc[0]['user_id'] # Assuming user_id is available like this + user_id = self.filtered_pointsdf.iloc[0]['user_id'] if not self.filtered_points_df.empty else None esds.store_pipeline_time(user_id, ecwp.PipelineStages.TRIP_SEGMENTATION.name + "/segment_into_trips_time/get_filtered_location", time.time(), t_get_filtered_points_pre_ts_diff_df.elapsed) # Timer for filtering out bogus points