aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2022-04-05 12:02:50 -0700
committerBryan Newbold <bnewbold@robocracy.org>2022-04-05 12:02:50 -0700
commit610e3086b42d50fc65945664bd8ff74579d88e9a (patch)
tree78b1e2614dfb314450df0c4c6139039ec17bde50 /python
parent70e905bc21835476f6713289ad0f31e4c56cae32 (diff)
downloadfatcat-610e3086b42d50fc65945664bd8ff74579d88e9a.tar.gz
fatcat-610e3086b42d50fc65945664bd8ff74579d88e9a.zip
fileset ingest: handle missing/partial file-level metadata
Diffstat (limited to 'python')
-rw-r--r--python/fatcat_tools/importers/ingest.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/fatcat_tools/importers/ingest.py b/python/fatcat_tools/importers/ingest.py
index 20963918..c1fed31f 100644
--- a/python/fatcat_tools/importers/ingest.py
+++ b/python/fatcat_tools/importers/ingest.py
@@ -779,10 +779,10 @@ class IngestFilesetResultImporter(IngestFileResultImporter):
fsf = fatcat_openapi_client.FilesetFile(
path=ingest_file["path"],
size=ingest_file["size"],
- md5=ingest_file["md5"],
- sha1=ingest_file["sha1"],
+ md5=ingest_file.get("md5"),
+ sha1=ingest_file.get("sha1"),
sha256=ingest_file.get("sha256"),
- mimetype=ingest_file["mimetype"],
+ mimetype=ingest_file.get("mimetype"),
extra=dict(),
)
if not (fsf.md5 and fsf.sha1 and fsf.path and fsf.size and fsf.mimetype):