aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-11-24 17:07:25 -0800
committerBryan Newbold <bnewbold@robocracy.org>2021-11-24 17:07:25 -0800
commite72d61e60c43911b6d77c4842951441235561dcf (patch)
treec444d85fbaf35f5fea7908c752528467acaa1672 /python
parentb09be729863f8860b1b81b1498ff325a2a08d36b (diff)
downloadfatcat-e72d61e60c43911b6d77c4842951441235561dcf.tar.gz
fatcat-e72d61e60c43911b6d77c4842951441235561dcf.zip
container merger: defer allocation of editgroup_id; and dummy code path
Diffstat (limited to 'python')
-rw-r--r--python/fatcat_tools/mergers/containers.py6
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]