From d3b6669a662f475faaf31f337283fae59bda9a9e Mon Sep 17 00:00:00 2001 From: Antoine Augusti Date: Fri, 6 Oct 2023 11:43:43 +0200 Subject: [PATCH] =?UTF-8?q?Requ=C3=AAteur=20SIRI=20:=20ajuste=20requ=C3=AA?= =?UTF-8?q?te=20EstimatedTimetable=20(#3509)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Requêteur SIRI : ajuste requête EstimatedTimetable * format --- apps/transport/lib/siri_queries.ex | 14 +++++++++----- .../transport/test/transport/siri_queries_test.exs | 2 ++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/apps/transport/lib/siri_queries.ex b/apps/transport/lib/siri_queries.ex index 80e96ac2f8..1b9843d136 100644 --- a/apps/transport/lib/siri_queries.ex +++ b/apps/transport/lib/siri_queries.ex @@ -81,11 +81,15 @@ defmodule Transport.SIRI do def line_refs_element([] = _line_refs), do: nil def line_refs_element(line_refs) do - line_refs = Enum.map(line_refs, &element("siri:LineRef", [], &1)) - - element("siri:Lines", [], [ - element("siri:LineDirection", [], line_refs) - ]) + element( + "siri:Lines", + [], + Enum.map(line_refs, fn line_ref -> + element("siri:LineDirection", [], [ + element("siri:LineRef", [], line_ref) + ]) + end) + ) end def append_if_not_nil(list, nil), do: list diff --git a/apps/transport/test/transport/siri_queries_test.exs b/apps/transport/test/transport/siri_queries_test.exs index 02263892a6..d86b1eabb9 100644 --- a/apps/transport/test/transport/siri_queries_test.exs +++ b/apps/transport/test/transport/siri_queries_test.exs @@ -127,6 +127,8 @@ defmodule Transport.SIRITest do #{line_001} + + #{line_002}