Activity: all_non_create_by_object_ap_id_q → by_object_ap_id
This commit is contained in:
parent
b82c6dc536
commit
75e4c8f0b2
2 changed files with 2 additions and 3 deletions
|
@ -53,8 +53,7 @@ def all_by_object_ap_id_q(ap_id) do
|
|||
)
|
||||
end
|
||||
|
||||
# Wrong name, returns all.
|
||||
def all_non_create_by_object_ap_id_q(ap_id) do
|
||||
def by_object_ap_id(ap_id) do
|
||||
from(
|
||||
activity in Activity,
|
||||
where:
|
||||
|
|
|
@ -85,7 +85,7 @@ def swap_object_with_tombstone(object) do
|
|||
|
||||
def delete(%Object{data: %{"id" => id}} = object) do
|
||||
with {:ok, _obj} = swap_object_with_tombstone(object),
|
||||
Repo.delete_all(Activity.all_non_create_by_object_ap_id_q(id)),
|
||||
Repo.delete_all(Activity.by_object_ap_id(id)),
|
||||
{:ok, true} <- Cachex.del(:object_cache, "object:#{id}") do
|
||||
{:ok, object}
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue