Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions apps/state/lib/state/stops_on_route.ex
Original file line number Diff line number Diff line change
Expand Up @@ -179,27 +179,9 @@ defmodule State.StopsOnRoute do
end)
|> Enum.flat_map(&do_gather_direction_group(route, global_stop_id_order, &1))

explicit_override_records = gather_explicit_overrides(route, direction_id)

shape_records
|> Enum.concat(other_records)
|> Enum.concat(explicit_override_records)
Enum.concat(shape_records, other_records)
end

defp gather_explicit_overrides(%{id: "Boat-F6"}, 1),
do: [
{"Boat-F6", 1, :all, "Boat-F6-Wdy-Smr-23", true,
["Boat-Winthrop", "Boat-Quincy", "Boat-Logan", "Boat-Fan", "Boat-Aquarium"]}
]

defp gather_explicit_overrides(%{id: "Boat-F6"}, 0),
do: [
{"Boat-F6", 0, :all, "Boat-F6-Wdy-Smr-23", true,
["Boat-Aquarium", "Boat-Fan", "Boat-Logan", "Boat-Quincy", "Boat-Winthrop"]}
]

defp gather_explicit_overrides(_, _), do: []

defp do_gather_direction_group(route, global_order, {group_key, trip_group}) do
{canonical?, shape_id, service_id, direction_id} = group_key

Expand Down
Loading