Change some String.to_atom/1 to String.to_existing_atom/1

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-01-22 18:16:00 +01:00
parent b7915a6467
commit 21698f754d
2 changed files with 4 additions and 16 deletions

View File

@@ -296,18 +296,6 @@ defmodule Mobilizon.Actors do
end
end
# defp transform_media_file(nil), do: nil
# defp transform_media_file(file) do
# file = for({key, val} <- file, into: %{}, do: {String.to_atom(key), val})
# if is_nil(file) do
# nil
# else
# struct(Mobilizon.Medias.File, file)
# end
# end
@delete_actor_default_options [reserve_username: true, suspension: false]
def delete_actor(%Actor{} = actor, options \\ @delete_actor_default_options) do