Use different index for object fetching.
authorRoger Braun <rbraun@Bobble.local>
Tue, 24 Oct 2017 08:39:23 +0000 (10:39 +0200)
committerRoger Braun <rbraun@Bobble.local>
Tue, 24 Oct 2017 08:39:23 +0000 (10:39 +0200)
lib/pleroma/object.ex

index 3c42c7cb5852b28d85888cde8b44a00e9dbeaca4..a5a1d6a763a94302bb163fdf90de0b2802387fcb 100644 (file)
@@ -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