From 610e3086b42d50fc65945664bd8ff74579d88e9a Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 5 Apr 2022 12:02:50 -0700 Subject: fileset ingest: handle missing/partial file-level metadata --- python/fatcat_tools/importers/ingest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python') 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): -- cgit v1.2.3