fix: fiter null values from result (#7951)

This commit is contained in:
Laurin 2026-04-08 15:16:51 +02:00 committed by GitHub
parent 61394f30b0
commit 1333fbcafa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1710,7 +1710,9 @@ export async function createStorage(
FROM (
SELECT
it.id,
array_agg(tv.destination_target_id) as targets
array_agg(DISTINCT tv.destination_target_id)
FILTER (WHERE tv.destination_target_id IS NOT NULL)
AS "targets"
FROM targets AS it
LEFT JOIN target_validation AS tv ON (tv.target_id = it.id)
WHERE it.id = ${target} AND it.project_id = ${project}
@ -1786,7 +1788,9 @@ export async function createStorage(
FROM (
SELECT
it.id
, array_agg(tv.destination_target_id) as targets
, array_agg(tv.destination_target_id)
FILTER (WHERE tv.destination_target_id IS NOT NULL)
AS "targets"
FROM targets AS it
LEFT JOIN target_validation AS tv ON (tv.target_id = it.id)
WHERE