summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-05-26 18:03:17 -0700
committerBryan Newbold <bnewbold@robocracy.org>2020-05-26 19:10:38 -0700
commit9bbc8f4ceec54563d71c68564b35ceb14ac60840 (patch)
treee0f6d233554f259fbb42358b2c3c3afa6b4093ce /python
parent8c204018ad9c1aa7f0296b2ae8d23d6f2577309c (diff)
downloadfatcat-9bbc8f4ceec54563d71c68564b35ceb14ac60840.tar.gz
fatcat-9bbc8f4ceec54563d71c68564b35ceb14ac60840.zip
ingest importer: check that stage is consistent with release
Diffstat (limited to 'python')
-rw-r--r--python/fatcat_tools/importers/ingest.py5
1 files changed, 5 insertions, 0 deletions
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'):