From 9a99dcb74c13acd98cb4022cb01f28138699e180 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 23 Mar 2022 19:28:41 -0700 Subject: bugfix: logic flow in fileset release checking --- python/fatcat_tools/importers/ingest.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'python') diff --git a/python/fatcat_tools/importers/ingest.py b/python/fatcat_tools/importers/ingest.py index 653b4b0a..47032b26 100644 --- a/python/fatcat_tools/importers/ingest.py +++ b/python/fatcat_tools/importers/ingest.py @@ -822,15 +822,18 @@ class IngestFilesetResultImporter(IngestFileResultImporter): # NOTE: in lieu of existing checks (by lookup), only allow one fileset per release if not self.bezerk_mode: release = self.api.get_release(fse.release_ids[0], expand="filesets") + # check if this is an existing match, or just a similar hit for other in release.filesets or []: if filesets_very_similar(other, fse): self.counts["exists"] += 1 return False + # for now, being conservative and just skipping if release has any other fileset - self.counts["skip-release-has-fileset"] += 1 - self.counts["skip"] += 1 - return False + if release.filesets: + self.counts["skip-release-has-fileset"] += 1 + self.counts["skip"] += 1 + return False return True -- cgit v1.2.3