From 854f6abd978dd4bfdec85a819c11b58ed057ead4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Z=C3=BCbeyde=20Civelek?= Date: Tue, 15 Sep 2026 15:25:57 +0200 Subject: [PATCH] fix(ep): attach communities to public EP record --- .../rdm/records/load/entities/ep_migration_entry_load.py | 5 +++++ cds_migrator_kit/rdm/records/load/entities/ep_split.py | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cds_migrator_kit/rdm/records/load/entities/ep_migration_entry_load.py b/cds_migrator_kit/rdm/records/load/entities/ep_migration_entry_load.py index 8a3908e0..55f2cf74 100644 --- a/cds_migrator_kit/rdm/records/load/entities/ep_migration_entry_load.py +++ b/cds_migrator_kit/rdm/records/load/entities/ep_migration_entry_load.py @@ -175,6 +175,11 @@ def _load_split(self, entry: MigrationEntry, recid): priority="critical", ) + # Load access grants + communities for the public record + self.parent_load_cls( + public_entry, self.migration_logger, public_record_state + ).load(published_record=public_records[-1], uow=uow) + # Original-dump persistence for the public half. self._save_original_dumped_record( public_entry, public_record_state, uow diff --git a/cds_migrator_kit/rdm/records/load/entities/ep_split.py b/cds_migrator_kit/rdm/records/load/entities/ep_split.py index e4b444ad..febd1438 100644 --- a/cds_migrator_kit/rdm/records/load/entities/ep_split.py +++ b/cds_migrator_kit/rdm/records/load/entities/ep_split.py @@ -70,7 +70,6 @@ def identifiers(self, identifiers): def build(self) -> MigrationEntry: """Return a load entry with split files and modified metadata.""" split = _split_copy(self.entry) - split.pop("ep_approval", None) split["versions"] = self._build_versions(split) self._apply_metadata(split) self._apply_entry_modifications(split)