~ihabunek/triglav

2a125ea29422a8426d3dae1383e6eef033f223a1 — Ivan Habunek 8 months ago ec1d133
Fix bug where master route was not shown
1 files changed, 2 insertions(+), 4 deletions(-)

M lib/triglav_web/controllers/zet/routes_controller.ex
M lib/triglav_web/controllers/zet/routes_controller.ex => lib/triglav_web/controllers/zet/routes_controller.ex +2 -4
@@ 36,10 36,7 @@ defmodule TriglavWeb.Zet.RoutesController do
    zet_stop_ids = Gtfs.list_gtfs_stop_ids() |> Enum.group_by(& &1.route_id)

    for route <- routes do
      route_relations =
        relations
        |> Enum.filter(&Relation.is_route/1)
        |> Enum.filter(&Relation.has_tag?(&1, "ref", route.id))
      route_relations = Enum.filter(relations, &Relation.has_tag?(&1, "ref", route.id))

      osm_variants =
        route_relations


@@ 59,6 56,7 @@ defmodule TriglavWeb.Zet.RoutesController do
      }

      hierarchy = make_hierarchy(route_relations)

      {route, hierarchy, counts}
    end
  end