diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2022-03-23 19:28:41 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2022-03-23 19:28:41 -0700 |
commit | 9a99dcb74c13acd98cb4022cb01f28138699e180 (patch) | |
tree | feee88d589981d34c58ddae9b20c8567aae7c17c /python/fatcat_tools | |
parent | 134cb050988be2c545af89e0a67c4998307bb819 (diff) | |
download | fatcat-9a99dcb74c13acd98cb4022cb01f28138699e180.tar.gz fatcat-9a99dcb74c13acd98cb4022cb01f28138699e180.zip |
bugfix: logic flow in fileset release checking
Diffstat (limited to 'python/fatcat_tools')
-rw-r--r-- | python/fatcat_tools/importers/ingest.py | 9 |
1 files changed, 6 insertions, 3 deletions
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 |