Replace local maybe_put helpers
This commit is contained in:
@@ -264,7 +264,7 @@ defmodule BDS.ImportAnalysis do
|
||||
status: item.status
|
||||
}
|
||||
|
||||
maybe_put(base, :resolution, item.resolution)
|
||||
BDS.MapUtils.maybe_put(base, :resolution, item.resolution)
|
||||
end
|
||||
|
||||
defp summary_item(item) do
|
||||
@@ -276,7 +276,7 @@ defmodule BDS.ImportAnalysis do
|
||||
status: item.status
|
||||
}
|
||||
|
||||
maybe_put(base, :resolution, item.resolution)
|
||||
BDS.MapUtils.maybe_put(base, :resolution, item.resolution)
|
||||
end
|
||||
|
||||
defp summarize_post_items(items) do
|
||||
@@ -546,9 +546,6 @@ defmodule BDS.ImportAnalysis do
|
||||
end)
|
||||
end
|
||||
|
||||
defp maybe_put(map, _key, nil), do: map
|
||||
defp maybe_put(map, key, value), do: Map.put(map, key, value)
|
||||
|
||||
defp blank_to_nil(nil), do: nil
|
||||
defp blank_to_nil(""), do: nil
|
||||
defp blank_to_nil(value), do: value
|
||||
|
||||
Reference in New Issue
Block a user