mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 16:40:29 +00:00
Check if object->data is array when looking up attachment objects to delete
This commit is contained in:
parent
d150c598d7
commit
0709757e47
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue