From ec546baee915ecd9843f3c84e5cb0dbdbdcad826 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 24 Oct 2017 10:39:23 +0200 Subject: [PATCH] Use different index for object fetching. --- lib/pleroma/object.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ def change(struct, params \\ %{}) 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