fix(catalog-backend): deduplicate entity IDs when marking for stitching after deletion

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2026-05-22 14:40:30 +02:00
parent f1d243293b
commit 9f85367cdc
@@ -240,7 +240,7 @@ async function markEntitiesAffectedByDeletionForStitching(options: {
// change, but not here - this code by its very definition is meant to not
// leave any orphans behind, so we can simplify away that.
const affectedIds = await knex
.select('refresh_state.entity_id AS entity_id')
.distinct('refresh_state.entity_id AS entity_id')
.from('relations')
.join(
'refresh_state',