summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers/matched.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-14 18:01:27 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-14 18:01:27 -0700
commit7c18e1d22b16bb920c9bb9a788691820bbdb2bfa (patch)
tree0e623bc4442f8a36267607a8f32106a3f241ee9c /python/fatcat_tools/importers/matched.py
parent1e0e890284978dc7379db707ed1fa2c902e297c6 (diff)
downloadfatcat-7c18e1d22b16bb920c9bb9a788691820bbdb2bfa.tar.gz
fatcat-7c18e1d22b16bb920c9bb9a788691820bbdb2bfa.zip
python impl
Diffstat (limited to 'python/fatcat_tools/importers/matched.py')
-rw-r--r--python/fatcat_tools/importers/matched.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/python/fatcat_tools/importers/matched.py b/python/fatcat_tools/importers/matched.py
index f3f2e141..4d78fdc9 100644
--- a/python/fatcat_tools/importers/matched.py
+++ b/python/fatcat_tools/importers/matched.py
@@ -143,13 +143,14 @@ class MatchedImporter(EntityImporter):
existing.size = existing.size or fe.size
existing.md5 = existing.md5 or fe.md5
existing.sha256 = existing.sha256 or fe.sha256
- self.api.update_file(existing.ident, existing, editgroup_id=self.get_editgroup_id())
+ self.api.update_file(self.get_editgroup_id(), existing.ident, existing)
self.counts['update'] += 1
return False
def insert_batch(self, batch):
- self.api.create_file_batch(batch,
- autoaccept=True,
- description=self.editgroup_description,
- extra=json.dumps(self.editgroup_extra))
+ self.api.create_file_auto_batch(fatcat_client.FileAutoBatch(
+ editgroup=fatcat_client.Editgroup(
+ description=self.editgroup_description,
+ extra=self.editgroup_extra),
+ entity_list=batch))