Don't use step variable twice

Accidentally used `step` variable twice when the actual error is like
`{:import, {:error, import_step, ..., ...}` which would only allow
`{:import, {:error, :import, ..., ...}`.
pull/1256/head
Luke Imhoff 6 years ago
parent 3e3c9198ce
commit e22fca4ada
  1. 2
      apps/indexer/lib/indexer/block/fetcher.ex

@ -149,7 +149,7 @@ defmodule Indexer.Block.Fetcher do
{:ok, %{inserted: inserted, errors: blocks_errors ++ beneficiaries_errors}} {:ok, %{inserted: inserted, errors: blocks_errors ++ beneficiaries_errors}}
else else
{step, {:error, reason}} -> {:error, {step, reason}} {step, {:error, reason}} -> {:error, {step, reason}}
{step, {:error, step, failed_value, changes_so_far}} -> {:error, {step, failed_value, changes_so_far}} {:import, {:error, step, failed_value, changes_so_far}} -> {:error, {step, failed_value, changes_so_far}}
end end
end end

Loading…
Cancel
Save