Make deleting an actor ignoring error when deleting files
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
f84cc299ba
commit
bfb04bb84d
@ -1343,6 +1343,7 @@ defmodule Mobilizon.Actors do
|
|||||||
|
|
||||||
defp remove_banner(%Actor{banner: %File{url: url}} = actor) do
|
defp remove_banner(%Actor{banner: %File{url: url}} = actor) do
|
||||||
safe_remove_file(url, actor)
|
safe_remove_file(url, actor)
|
||||||
|
{:ok, actor}
|
||||||
end
|
end
|
||||||
|
|
||||||
@spec remove_avatar(Actor.t()) :: {:ok, Actor.t()}
|
@spec remove_avatar(Actor.t()) :: {:ok, Actor.t()}
|
||||||
@ -1350,6 +1351,7 @@ defmodule Mobilizon.Actors do
|
|||||||
|
|
||||||
defp remove_avatar(%Actor{avatar: %File{url: url}} = actor) do
|
defp remove_avatar(%Actor{avatar: %File{url: url}} = actor) do
|
||||||
safe_remove_file(url, actor)
|
safe_remove_file(url, actor)
|
||||||
|
{:ok, actor}
|
||||||
end
|
end
|
||||||
|
|
||||||
@spec safe_remove_file(String.t(), Actor.t()) :: {:ok, Actor.t()}
|
@spec safe_remove_file(String.t(), Actor.t()) :: {:ok, Actor.t()}
|
||||||
|
Loading…
Reference in New Issue
Block a user