Skip to content
Snippets Groups Projects
Commit ec546bae authored by Roger Braun's avatar Roger Braun
Browse files

Use different index for object fetching.

parent 261ec824
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ defmodule Pleroma.Object do
def get_by_ap_id(nil), do: nil
def get_by_ap_id(ap_id) do
Repo.one(from object in Object,
where: fragment("? @> ?", object.data, ^%{id: ap_id}))
where: fragment("(?)->>'id' = ?", object.data, ^ap_id))
end
def get_cached_by_ap_id(ap_id) do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment