From: Roger Braun Date: Tue, 24 Oct 2017 08:39:23 +0000 (+0200) Subject: Use different index for object fetching. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=ec546baee915ecd9843f3c84e5cb0dbdbdcad826;p=akkoma Use different index for object fetching. --- diff --git a/lib/pleroma/object.ex b/lib/pleroma/object.ex index 3c42c7cb5..a5a1d6a76 100644 --- a/lib/pleroma/object.ex +++ b/lib/pleroma/object.ex @@ -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