Skip to content

Commit

Permalink
fix: only skip stop, if former was not already skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
hbruch committed Sep 26, 2024
1 parent a8447e8 commit 2666fbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion amarillo/services/trips.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def _stops_and_stop_times(self, start_time, trip_id, stops_frame):
logger.debug("Skipped stop %s", current_stop.id)
continue
else:
if (current_stop.time-stops_frame.iloc[i-1].time) < 5000 and not i==1 and not is_carpooling_stop(current_stop.id, current_stop.stop_name):
if (current_stop.time-stops_frame.iloc[i-1].time) < 5000 and not i==1 and not is_carpooling_stop(current_stop.id, current_stop.stop_name) and not stops_frame.iloc[i-1].id is None:
# skip latter stop if it's very close (<5 seconds drive) by the preceding
logger.debug("Skipped stop %s", current_stop.id)
continue
Expand Down

0 comments on commit 2666fbb

Please sign in to comment.