diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-24 17:07:25 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-24 17:07:25 -0800 |
commit | e72d61e60c43911b6d77c4842951441235561dcf (patch) | |
tree | c444d85fbaf35f5fea7908c752528467acaa1672 /python/fatcat_tools | |
parent | b09be729863f8860b1b81b1498ff325a2a08d36b (diff) | |
download | fatcat-e72d61e60c43911b6d77c4842951441235561dcf.tar.gz fatcat-e72d61e60c43911b6d77c4842951441235561dcf.zip |
container merger: defer allocation of editgroup_id; and dummy code path
Diffstat (limited to 'python/fatcat_tools')
-rw-r--r-- | python/fatcat_tools/mergers/containers.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/python/fatcat_tools/mergers/containers.py b/python/fatcat_tools/mergers/containers.py index 4bdafe1b..069ce23c 100644 --- a/python/fatcat_tools/mergers/containers.py +++ b/python/fatcat_tools/mergers/containers.py @@ -93,7 +93,6 @@ class ContainerMerger(EntityMerger): entities: Dict[str, ContainerEntity] = dict() redirects: Dict[str, List[str]] = dict() release_counts: Dict[str, int] = dict() - eg_id = self.get_editgroup_id() all_ids = dupe_ids.copy() if primary_id: @@ -137,6 +136,11 @@ class ContainerMerger(EntityMerger): assert primary_id not in dupe_ids + if self.dry_run_mode: + eg_id = "dummy-editgroup-id" + else: + eg_id = self.get_editgroup_id() + primary = entities[primary_id] for other_id in dupe_ids: other = entities[other_id] |