Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add handling for missing 'trip_id' key in to_geojson function #426

Merged
merged 2 commits into from
Nov 30, 2023
Merged

Conversation

albertkun
Copy link
Contributor

@albertkun albertkun commented Nov 30, 2023

This pull request adds a new feature to the to_geojson function in order to handle cases where the 'trip_id' key is missing in the input data. Previously, the function would throw an error if the 'trip_id' key was None, but now it checks if the key is present in the dictionary before accessing it. If the key is missing or its value is None, the item is skipped.

This change improves the robustness of the to_geojson function and ensures that it can handle a wider range of input data. It also helps to prevent potential errors and crashes when processing data that may have missing or incomplete information.

Add handling for missing 'trip_id' key in to_geojson function
@albertkun albertkun merged commit 8988f20 into main Nov 30, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant