From 747281b45ddc35312c6978e0a38a3145abc8883a Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 24 Sep 2018 22:50:40 -0700 Subject: if we need to create a container for a release, accept it This is working around bad (and undocumented) behavior around autoaccept batch imports, which resulted in hundreds of thousands of duplicate "unaccepted" containers in production. --- python/fatcat/crossref_importer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/fatcat/crossref_importer.py b/python/fatcat/crossref_importer.py index c3e8f9db..8e179b69 100644 --- a/python/fatcat/crossref_importer.py +++ b/python/fatcat/crossref_importer.py @@ -250,7 +250,10 @@ class FatcatCrossrefImporter(FatcatImporter): if entities is not None: (re, ce) = entities if ce is not None: - container = self.api.create_container(ce, editgroup=editgroup) + ce_eg = self.api.create_editgroup( + fatcat_client.Editgroup(editor_id='aaaaaaaaaaaabkvkaaaaaaaaae')) + container = self.api.create_container(ce, editgroup=ce_eg.id) + self.api.accept_editgroup(ce_eg.id) re.container_id = container.ident self._issnl_id_map[ce.issnl] = container.ident release_batch.append(re) -- cgit v1.2.3