From 811f0a52779afdaa8e1f11a3781fc22fa3acc02c Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 11 Jan 2019 15:17:32 -0800 Subject: use full-on autoaccept mode Now that editor_id is infered from token, don't *need* to create ahead of time. This backend change simplifies things greatly (either update an existing editgroup, or create new and *only* include entities in the batch transaction), at the cost of being able to configure the editgroup in any way, including setting a description. --- python/fatcat_tools/importers/orcid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/fatcat_tools/importers/orcid.py') diff --git a/python/fatcat_tools/importers/orcid.py b/python/fatcat_tools/importers/orcid.py index 0aa4ab00..0c8b1d62 100644 --- a/python/fatcat_tools/importers/orcid.py +++ b/python/fatcat_tools/importers/orcid.py @@ -74,10 +74,10 @@ class OrcidImporter(FatcatImporter): self.api.create_creator(ce, editgroup_id=editgroup_id) self.counts['insert'] += 1 - def create_batch(self, batch, editgroup_id=None): + def create_batch(self, batch): """Reads and processes in batches (not API-call-per-line)""" objects = [self.parse_orcid_dict(json.loads(l)) for l in batch if l != None] objects = [o for o in objects if o != None] - self.api.create_creator_batch(objects, autoaccept="true", editgroup_id=editgroup_id) + self.api.create_creator_batch(objects, autoaccept="true") self.counts['insert'] += len(objects) -- cgit v1.2.3