File tree Expand file tree Collapse file tree
packages/services/storage/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1710,7 +1710,9 @@ export async function createStorage(
17101710 FROM (
17111711 SELECT
17121712 it.id,
1713- array_agg(tv.destination_target_id) as targets
1713+ array_agg(DISTINCT tv.destination_target_id)
1714+ FILTER (WHERE tv.destination_target_id IS NOT NULL)
1715+ AS "targets"
17141716 FROM targets AS it
17151717 LEFT JOIN target_validation AS tv ON (tv.target_id = it.id)
17161718 WHERE it.id = ${ target } AND it.project_id = ${ project }
@@ -1786,7 +1788,9 @@ export async function createStorage(
17861788 FROM (
17871789 SELECT
17881790 it.id
1789- , array_agg(tv.destination_target_id) as targets
1791+ , array_agg(tv.destination_target_id)
1792+ FILTER (WHERE tv.destination_target_id IS NOT NULL)
1793+ AS "targets"
17901794 FROM targets AS it
17911795 LEFT JOIN target_validation AS tv ON (tv.target_id = it.id)
17921796 WHERE
You can’t perform that action at this time.
0 commit comments