Skip to content

Commit f8f60d2

Browse files
authored
Duration.to_string (#464)
See #458
1 parent 46b14cb commit f8f60d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/phoenix/live_dashboard/pages/ecto_stats_page.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule Phoenix.LiveDashboard.EctoStatsPage do
33
use Phoenix.LiveDashboard.PageBuilder
44
import Phoenix.LiveDashboard.Helpers
55

6-
@compile {:no_warn_undefined, [Decimal, EctoPSQLExtras, {Ecto.Repo, :all_running, 0}]}
6+
@compile {:no_warn_undefined, [Decimal, Duration, EctoPSQLExtras, {Ecto.Repo, :all_running, 0}]}
77
@disabled_link "https://hexdocs.pm/phoenix_live_dashboard/ecto_stats.html"
88
@page_title "Ecto Stats"
99

@@ -277,7 +277,7 @@ defmodule Phoenix.LiveDashboard.EctoStatsPage do
277277
{sorted, length(rows)}
278278
end
279279

280-
defp format(_, %struct{} = value) when struct in [Decimal, Postgrex.Interval],
280+
defp format(_, %struct{} = value) when struct in [Decimal, Duration, Postgrex.Interval],
281281
do: struct.to_string(value)
282282

283283
defp format(:bytes, value) when is_integer(value),

0 commit comments

Comments
 (0)