From 9bbc8f4ceec54563d71c68564b35ceb14ac60840 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 26 May 2020 18:03:17 -0700 Subject: ingest importer: check that stage is consistent with release --- python/fatcat_tools/importers/ingest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/fatcat_tools/importers/ingest.py b/python/fatcat_tools/importers/ingest.py index 6cf1604b..2b630e67 100644 --- a/python/fatcat_tools/importers/ingest.py +++ b/python/fatcat_tools/importers/ingest.py @@ -109,6 +109,11 @@ class IngestFileResultImporter(EntityImporter): self.counts['warn-extid-invalid'] += 1 continue raise err + # verify release_stage + if request.get('release_stage') and release.release_stage: + if request['release_stage'] != release.release_stage: + self.counts['skip-release-stage'] += 1 + return None release_ident = release.ident break if self.use_glutton_match and not release_ident and row.get('grobid'): -- cgit v1.2.3