diff --git a/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts b/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts index 1f984c1bab..5b191dce32 100644 --- a/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts +++ b/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts @@ -141,24 +141,12 @@ export class DefaultProcessingDatabase implements ProcessingDatabase { BATCH_SIZE, ); - // Find the top-level location entity that manages the processedEntity - let entityRefToRefresh = sourceEntityRef; - const { entityRefs } = await this.listAncestors(tx, { - entityRef: sourceEntityRef, - }); - const locationAncestor = entityRefs.find(ref => - ref.startsWith('location:'), - ); - if (locationAncestor) { - entityRefToRefresh = locationAncestor; - } - // Insert the refresh keys for the processed entity await Promise.all( options.refreshKeys.map(k => { return tx('refresh_keys') .insert({ - entity_ref: entityRefToRefresh, + entity_ref: sourceEntityRef, key: k.key, }) .onConflict(['entity_ref', 'key'])