From bfb04bb84db6affae79587ef2a08a7579eef1c16 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 12 May 2021 18:19:03 +0200 Subject: [PATCH] Make deleting an actor ignoring error when deleting files Signed-off-by: Thomas Citharel --- lib/mobilizon/actors/actors.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/mobilizon/actors/actors.ex b/lib/mobilizon/actors/actors.ex index 41543270..8cd11ec1 100644 --- a/lib/mobilizon/actors/actors.ex +++ b/lib/mobilizon/actors/actors.ex @@ -1343,6 +1343,7 @@ defmodule Mobilizon.Actors do defp remove_banner(%Actor{banner: %File{url: url}} = actor) do safe_remove_file(url, actor) + {:ok, actor} end @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 safe_remove_file(url, actor) + {:ok, actor} end @spec safe_remove_file(String.t(), Actor.t()) :: {:ok, Actor.t()}