mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-24 08:54:08 +00:00
Fix deleting person detached from user
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
4be5cc787e
commit
02381f2820
1 changed files with 2 additions and 1 deletions
|
@ -93,7 +93,8 @@ defmodule Mix.Tasks.Mobilizon.Actors.Delete do
|
|||
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)
|
||||
|
||||
if length(actors) == 1 do
|
||||
|
|
Loading…
Reference in a new issue