-
Notifications
You must be signed in to change notification settings - Fork 18
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: only adjust headsign to last predicted stop on subway routes #840
Conversation
f9a003a
to
01924c7
Compare
Coverage of commit
|
apps/state/lib/state/trip/added.ex
Outdated
# A large number of unrelated tests end up calling this function without | ||
# having set up a route, from predictions to the rate limiter, so we | ||
# guard against that here | ||
route_type = if route, do: route.type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of this, you could update the subway?
function definition to something like....
defp subway?(%Route{type: type}), do: subway?(type)
defp subway?(type) when type in [0, 1], do: true
defp subway(_), do: false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one small thing, then 👍
01924c7
to
6a7a886
Compare
6a7a886
to
79eea68
Compare
Coverage of commit
|
Summary of changes
Asana Ticket: 🍎 Constraint "Adjust API headsign logic for ADDED trips" to subway/light rail