1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-27 07:55:04 +01:00

Use different index for object fetching.

This commit is contained in:
Roger Braun 2017-10-24 10:39:23 +02:00
parent 261ec82451
commit ec546baee9

View File

@ -24,7 +24,7 @@ defmodule Pleroma.Object do
def get_by_ap_id(nil), do: nil def get_by_ap_id(nil), do: nil
def get_by_ap_id(ap_id) do def get_by_ap_id(ap_id) do
Repo.one(from object in Object, Repo.one(from object in Object,
where: fragment("? @> ?", object.data, ^%{id: ap_id})) where: fragment("(?)->>'id' = ?", object.data, ^ap_id))
end end
def get_cached_by_ap_id(ap_id) do def get_cached_by_ap_id(ap_id) do