Skip to content

Commit

Permalink
don't include duplicate stops (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
meagonqz authored and ryan-mahoney committed Aug 9, 2019
1 parent 0d74ab5 commit 5aee167
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ defmodule SiteWeb.ScheduleController.LineController do
def reverse_direction("1"), do: "0"

def simple_stop_list(all_stops) do
Enum.map(all_stops, &simple_stop/1)
all_stops |> Enum.map(&simple_stop/1) |> Enum.uniq_by(& &1.id)
end

def simple_stop(%{
Expand Down

0 comments on commit 5aee167

Please sign in to comment.