projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d150c59
)
Check if object->data is array when looking up attachment objects to delete
author
Roman Chvanikov
<chvanikoff@pm.me>
Tue, 14 Jan 2020 16:53:28 +0000
(19:53 +0300)
committer
Roman Chvanikov
<chvanikoff@pm.me>
Tue, 14 Jan 2020 16:53:28 +0000
(19:53 +0300)
lib/pleroma/object.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/object.ex
b/lib/pleroma/object.ex
index 2452a7389345af649730392804dde6ecf2e13942..6c56a9c62f005b41a0a9436eda79fb721058b9b9 100644
(file)
--- a/
lib/pleroma/object.ex
+++ b/
lib/pleroma/object.ex
@@
-203,7
+203,8
@@
defmodule Pleroma.Object do
from(o in Object,
where:
fragment(
- "to_jsonb(array(select jsonb_array_elements((?)#>'{url}') ->> 'href'))::jsonb \\?| (?)",
+ "to_jsonb(array(select jsonb_array_elements((?)#>'{url}') ->> 'href' where jsonb_typeof((?)#>'{url}') = 'array'))::jsonb \\?| (?)",
+ o.data,
o.data,
^hrefs
)