diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-07-21 13:50:02 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-07-21 13:50:02 -0700 |
commit | 69ca9079a83902e312157937306644f873737806 (patch) | |
tree | 7ff6f92cd8ed00a9ace245b03f9696473defb098 /fatcat_scholar | |
parent | b1d881fd752acbc9661c5924c0e9886545b05c6a (diff) | |
download | fatcat-scholar-69ca9079a83902e312157937306644f873737806.tar.gz fatcat-scholar-69ca9079a83902e312157937306644f873737806.zip |
load issue rows: handle empty metadata
Diffstat (limited to 'fatcat_scholar')
-rw-r--r-- | fatcat_scholar/issue_db.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fatcat_scholar/issue_db.py b/fatcat_scholar/issue_db.py index 6769055..ba88d07 100644 --- a/fatcat_scholar/issue_db.py +++ b/fatcat_scholar/issue_db.py @@ -286,6 +286,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"] # pub_collection = [c for c in meta['collection'] if c.startswith("pub_")][0] |