Handle nil timestamp in datetime_to_hex function

v6.0.0-dev
Viktor Baranov 2 years ago
parent 5848a7ab21
commit e1c6f44c17
  1. 2
      apps/block_scout_web/lib/block_scout_web/views/api/rpc/logs_view.ex

@ -44,6 +44,8 @@ defmodule BlockScoutWeb.API.RPC.LogsView do
|> integer_to_hex()
end
defp datetime_to_hex(nil), do: nil
defp datetime_to_hex(datetime) do
datetime
|> DateTime.to_unix()

Loading…
Cancel
Save