summaryrefslogtreecommitdiffstats
path: root/fatcat_scholar
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-07-21 13:50:02 -0700
committerBryan Newbold <bnewbold@archive.org>2020-07-21 13:50:02 -0700
commit69ca9079a83902e312157937306644f873737806 (patch)
tree7ff6f92cd8ed00a9ace245b03f9696473defb098 /fatcat_scholar
parentb1d881fd752acbc9661c5924c0e9886545b05c6a (diff)
downloadfatcat-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.py2
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]