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

fix: support redirect as string #903

Merged
merged 1 commit into from
Feb 4, 2025
Merged

fix: support redirect as string #903

merged 1 commit into from
Feb 4, 2025

Conversation

cka-y
Copy link
Contributor

@cka-y cka-y commented Feb 4, 2025

Summary:
This pull request includes a change to the process_redirects method in the api/src/scripts/populate_db_gtfs.py file. A try-except block is added to handle ValueError exceptions when converting mdb_source_id to a float. This ensures that if the conversion fails, the mdb_source_id is stripped and used as-is.

Successful run: https://github.com/MobilityData/mobility-feed-api/actions/runs/13142416339
Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with ./scripts/api-tests.sh to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@cka-y cka-y linked an issue Feb 4, 2025 that may be closed by this pull request
@cka-y cka-y marked this pull request as ready for review February 4, 2025 18:41
@cka-y cka-y merged commit c568ce9 into main Feb 4, 2025
7 checks passed
@cka-y cka-y deleted the feat/896 branch February 4, 2025 19:33
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.

Update populate script to accept redirect id being a string or int
2 participants