From 2dea232afd02dc49ccbf114ab7fa1edf1b69e92d Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 1 Jul 2020 15:04:08 -0700 Subject: skip partial/stub issue items --- fatcat_scholar/issue_db.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fatcat_scholar') diff --git a/fatcat_scholar/issue_db.py b/fatcat_scholar/issue_db.py index fed12a1..6769055 100644 --- a/fatcat_scholar/issue_db.py +++ b/fatcat_scholar/issue_db.py @@ -250,6 +250,8 @@ class IssueDB: if not line: continue obj = json.loads(line) + if not "metadata" in obj: + continue meta = obj["metadata"] assert "periodicals" in meta["collection"] container: Optional[fatcat_openapi_client.ContainerEntity] = None -- cgit v1.2.3