Fix delete-by_ap_id to expect not only embeded objects
This commit is contained in:
parent
8e4d950f31
commit
4c289e924e
1 changed files with 1 additions and 0 deletions
|
@ -230,6 +230,7 @@ def delete_by_ap_id(id) when is_binary(id) do
|
|||
|> Repo.delete_all()
|
||||
|> elem(1)
|
||||
|> Enum.find(fn
|
||||
%{data: %{"type" => "Create", "object" => ap_id}} when is_binary(ap_id) -> ap_id == id
|
||||
%{data: %{"type" => "Create", "object" => %{"id" => ap_id}}} -> ap_id == id
|
||||
_ -> nil
|
||||
end)
|
||||
|
|
Loading…
Reference in a new issue