mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:57:33 +00:00
fix: correct handling of removed targets (#9824)
# Which Problems Are Solved In Actions v2, if a target is removed, which is still used in an execution, the target is still listed when list executions. # How the Problems Are Solved Removed targets are now also removed from the executions. # Additional Changes To be sure the list executions include a check if the target is still existing. # Additional Context None Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
SELECT instance_id,
|
||||
execution_id,
|
||||
SELECT et.instance_id,
|
||||
et.execution_id,
|
||||
JSONB_AGG(
|
||||
JSON_OBJECT(
|
||||
'position' : position,
|
||||
'include' : include,
|
||||
'target' : target_id
|
||||
)
|
||||
) as targets
|
||||
FROM projections.executions1_targets
|
||||
GROUP BY instance_id, execution_id
|
||||
'position' : et.position,
|
||||
'include' : et.include,
|
||||
'target' : et.target_id
|
||||
)
|
||||
) as targets
|
||||
FROM projections.executions1_targets AS et
|
||||
INNER JOIN projections.targets2 AS t
|
||||
ON et.instance_id = t.instance_id
|
||||
AND et.target_id IS NOT NULL
|
||||
AND et.target_id = t.id
|
||||
GROUP BY et.instance_id, et.execution_id
|
Reference in New Issue
Block a user