aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat/issn_importer.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-09-11 16:16:39 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-09-11 16:16:39 -0700
commitf5812c8c3b062b5efb34e45702ee7df507f71e16 (patch)
tree0eb409c0da5d212c82788c5a34d58ac864e9a9c8 /python/fatcat/issn_importer.py
parent91c080a2e82ec4e8908cb8e3916a543519151847 (diff)
downloadfatcat-f5812c8c3b062b5efb34e45702ee7df507f71e16.tar.gz
fatcat-f5812c8c3b062b5efb34e45702ee7df507f71e16.zip
python implementation of new editgroup param
Diffstat (limited to 'python/fatcat/issn_importer.py')
-rw-r--r--python/fatcat/issn_importer.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/python/fatcat/issn_importer.py b/python/fatcat/issn_importer.py
index eb8a50ba..ad2cad78 100644
--- a/python/fatcat/issn_importer.py
+++ b/python/fatcat/issn_importer.py
@@ -57,17 +57,14 @@ class FatcatIssnImporter(FatcatImporter):
extra=extra)
return ce
- def create_row(self, row, editgroup_id=None):
+ def create_row(self, row, editgroup=None):
ce = self.parse_issn_row(row)
if ce is not None:
- ce.editgroup_id = editgroup_id
- self.api.create_container(ce)
+ self.api.create_container(ce, editgroup=editgroup)
- def create_batch(self, batch, editgroup_id=None):
+ def create_batch(self, batch, editgroup=None):
"""Reads and processes in batches (not API-call-per-line)"""
objects = [self.parse_issn_row(l)
for l in batch if l != None]
objects = [o for o in objects if o != None]
- for o in objects:
- o.editgroup_id = editgroup_id
- self.api.create_container_batch(objects, autoaccept="true", editgroup=editgroup_id)
+ self.api.create_container_batch(objects, autoaccept="true", editgroup=editgroup)