Fix deleting person detached from user
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
4be5cc787e
commit
02381f2820
@ -93,7 +93,8 @@ defmodule Mix.Tasks.Mobilizon.Actors.Delete do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
defp check_actor(%Actor{type: :Person, domain: nil} = profile, assume_yes?) do
|
defp check_actor(%Actor{type: :Person, domain: nil, user_id: user_id} = profile, assume_yes?)
|
||||||
|
when not is_nil(user_id) do
|
||||||
%User{actors: actors, email: email} = Users.get_user_with_actors!(profile.user_id)
|
%User{actors: actors, email: email} = Users.get_user_with_actors!(profile.user_id)
|
||||||
|
|
||||||
if length(actors) == 1 do
|
if length(actors) == 1 do
|
||||||
|
Loading…
Reference in New Issue
Block a user