projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b35ff8f
)
Return nil for nil object requests.
author
Roger Braun
<roger@rogerbraun.net>
Tue, 24 Oct 2017 06:39:24 +0000
(08:39 +0200)
committer
Roger Braun
<roger@rogerbraun.net>
Tue, 24 Oct 2017 06:39:24 +0000
(08:39 +0200)
lib/pleroma/object.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/object.ex
b/lib/pleroma/object.ex
index 5b51d6be340170e649c55b7e8c8d06083c9464a2..3c42c7cb5852b28d85888cde8b44a00e9dbeaca4 100644
(file)
--- a/
lib/pleroma/object.ex
+++ b/
lib/pleroma/object.ex
@@
-21,6
+21,7
@@
defmodule Pleroma.Object do
|> unique_constraint(:ap_id, name: :objects_unique_apid_index)
end
+ 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}))